Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

Cleaning up some files #2

Merged
merged 6 commits into from
Feb 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on: [pull_request]
name: Check links for modified files
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
folder-path: 'docs'
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
check-modified-files-only: 'yes'
base-branch: 'main'
505 changes: 0 additions & 505 deletions docs/analytics/batch-event-upload.md

This file was deleted.

76 changes: 1 addition & 75 deletions docs/analytics/index.md
Original file line number Diff line number Diff line change
@@ -14,78 +14,4 @@ hide:
}
</style>

# Heading 1

Paragraph text. Here's a paragraph of nonsense text so you can understand what it looks like. Look at me! Wow, what a bunch of text!Paragraph text. Here's a paragraph of nonsense text so you can understand what it looks like. Look at me! Wow, what a bunch of text!Paragraph text. Here's a paragraph of nonsense text so you can understand what it looks like. Look at me! Wow, what a bunch of text!Paragraph text. Here's a paragraph of nonsense text so you can understand what it looks like. Look at me! Wow, what a bunch of text!Paragraph text. Here's a paragraph of nonsense text so you can understand what it looks like. Look at me! Wow, what a bunch of text!

## Heading 2

!!! note

I'm a note box

!!! example

I'm an example box

!!! tip

I'm a tip box

!!! warning

I'm a warning box

!!! info

I'm an info box

!!! success

I'm an success box

!!! question

I'm an question box

### Heading 3: Tab and Code Examples

=== "Tab 1"

```json
{
"user_id": "[email protected]",
"device_id": "C8F9E604-F01A-4BD9-95C6-8E5357DF265D",
"event_type": "$groupidentify",
"time": 1396381378123,
"groups": {
"team_id": "1",
"company_name": [
"Amplitude",
"DataMonster"
]
},
"group_properties": {
"$set": {
"start_date": "01/01/2017"
}
},
"event_id": 23,
"session_id": 1396381378123,
"insert_id": "5f0adeff-6668-4427-8d02-57d803a2b841"
}


```

=== "Tab 2"

Tab content

## Table Example

| Method | Description |
| ----------- | ------------------------------------ |
| `GET` | :material-check: Fetch resource |
| `PUT` | :material-check-all: Update resource |
| `DELETE` | :material-close: Delete resource |
Welcome to Amplitude Analytics. Use all these resources to do stuff.
85 changes: 85 additions & 0 deletions docs/apis/attribution-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
title: Attribution API
---

## Attribution API

--8<-- "includes/postman.md"

The Attribution API is for sending attribution campaign events (identified by `idfa`, `idfv`, or `adid`) that contain attribution information.

## Before you begin

- This API doesn't use authorization, but uses your API key. If you're using Postman, set your API key in Amplitude API Environment variables.
- Before you send a request, make sure you're using the correct endpoint.

| Region | Endpoint |
| --- | --- |
| Standard Server | <https://api2.amplitude.com/attribution> |
| EU Residency Server | <https://api.eu.amplitude.com/attribution> |

## Considerations


- If attribution events can't be matched to an existing user, then they are held for up to 72 hours for potential user matching. If an event isn't logged for a matching user within 72 hours of receiving the attribution data, then the **attribution data is dropped**.
- For most of our partners, attribution is matched to Amplitude users/events via the Advertising ID (IDFA/IDFV or ADID). Therefore, you must send the Advertising ID for attribution requests and you must set the idfa, idfv, and adid fields in Amplitude as the Advertising ID.
- If you are using the iOS SDK or Android SDK, you can enable tracking of the Advertising ID by following the instructions [here](https://developers.amplitude.com/docs/ios#advertising-id). If you are using JS SDK or React Native, these do not have the functionality to collect Advertising ID automatically due to Google's and Apple's privacy rules around advertising ID and web tracking. You will have to send the Advertising ID through our HTTP API endpoint so that Amplitude can match attribution data/events. See keys in our [HTTP API V2](https://developers.amplitude.com/docs/http-api-v2) doc.



### POST

https://api.amplitude.com/attribution

!!! example "Attribution Examples"

=== "iOS Attribution"

``` bash
POST /attribution HTTP/1.1
Host: api.amplitude.com
Content-Length: 365

api_key={{api_key}}&event=%7B%22event_type%22%3A%22%5BYOUR%20COMPANY%5D%20Install%22%2C%20%22idfa%22%3A%20%22AEBE52E7-03EE-455A-B3C4-E57283966239%22%2C%20%22user_properties%22%3A%20%7B%22%5BYOUR%20COMPANY%5D%20media%20source%22%3A%20%22facebook%22%2C%20%22%5BYOUR%20COMPANY%5D%20campaign%22%3A%20%22refer-a-friend%22%7D%2C%20%22platform%22%3A%20%22ios%22%7D

```

=== "Android Attribution"

```bash

POST /attribution?api_key={{api_key}}&event={"event_type":"[YOUR COMPANY] Install","adid": "AEBE52E7-03EE-455A-B3C4-E57283966239", "user_properties": {"[YOUR COMPANY] media source": "facebook", "[YOUR COMPANY] campaign": "refer-a-friend"}, "platform": "android"} HTTP/1.1
Host: api2.amplitude.com
```



##### Required Event Argument Keys

You must include the following keys within the event argument:

| Required Key | Type | Description | Example |
| --- | --- | --- | --- |
| event_type | string | Prefix with brackets "[YOUR COMPANY]". | "[YOUR COMPANY] Install" |
| platform | string | Either "ios" or "android". | "ios" |
| idfa or idfv | string | (*required for iOS*) The Identifier for Advertiser or the Identifier for Vendor. | AEBE52E7-03EE-455A-B3C4-E57283966239 |
| adid | string | *(required for Android)* The Google AdID, or Amazon Advertising ID for Amazon devices. | AEBE52E7-03EE-455A-B3C4-E57283966239 |

*Note: For iOS devices, you can send either the IDFA or the IDFV but you must send at least one.*

##### Optional Event Argument Keys

These optional keys are available.

| Additional Key | Type | Description | Example |
| --- | --- | --- | --- |
| android_id | string | (Android) The Android ID | AEBE52E7-03EE-455A-B3C4-E57283966239 |
| user_properties | dictionary | A dictionary of attribution properties prefixed with brackets "[YOUR COMPANY]". | {"[YOUR COMPANY] media source": "Facebook"} |
| time | long | Timestamp of the event in milliseconds since epoch. | 1396381378123, will be set to the upload time by default |

### Body (urlencoded)

|Name| | Description|
|---|---|---|
|api_key| INSERT API KEY| Required. Your API key.|
|event| {"event_type":"[YOUR COMPANY] Install", "idfa": "AEBE52E7-03EE-455A-B3C4-E57283966239", "user_properties": {"[YOUR COMPANY] media source": "facebook", "[YOUR COMPANY] campaign": "refer-a-friend"}, "platform": "ios"}|Required. A request parameter representing the event, in JSON format.|
3 changes: 3 additions & 0 deletions docs/apis/identify-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: Identify API
---
5 changes: 5 additions & 0 deletions docs/apis/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: API References
---

Go see this stuff in Postman
70 changes: 70 additions & 0 deletions docs/data/ampli-sdk-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: Ampli SDK Overview
description: An introduction to the Ampli SDK and CLI, and how they work with the Amplitude SDK.
---

The Ampli CLI, Ampli SDK, and Amplitude SDK work together to bring a tracking library into your project.

Iteratively can generate a tracking library for many platforms and programming languages. The autogenerated
library, the Ampli SDK, is a lightweight wrapper over the Amplitude SDK that provides type-safety, supports linting,
and enables features like input validation. The code replicates the spec in the Tracking Plan and enforces its rules
and requirements.

!!! tip
Visit the [ampli-examples GitHub repo](https://github.com/amplitude/ampli-examples) for example applications
that use the Ampli SDK.

## Ampli CLI

The Ampli CLI connects your codebase to your tracking plan. Each Source in your tracking plan represents a runtime
in which you wish to generate a strongly typed SDK.

`ampli pull` will login and download the Ampli SDK for your current tracking plan.

`ampli status` will verify implementation status of event tracking in your project.

## Ampli SDK

The Ampli SDK is a dynamic, code-generated SDK. It contains strong types for the events in your tracking plan, and
provides autocomplete and static type checking.

```js
ampli.songPlayed({ title: ‘Song #1’ })
```

The Ampli SDK is a light wrapper for untyped Amplitude SDKs.


## Amplitude SDK

The Amplitude SDK is a static, open source SDK with untyped events.

```js
amplitude.logEvent({ event_type: ‘Song Played’, event_properties: { title: ‘Song #1’ }})
```

The Ampli SDK runs on top of the Amplitude SDK. The `client.instance` is the Amplitude SDK client that makes the underlying calls to Amplitude. If you don't specify a `client.instance`, Ampli uses a default instance.

```js
class Ampli {
var client: AmplitudeClient;

load(options) {
// use provided AmplitudeCLient if available, default otherwise
this.client = options.client.instance || Amplitude.getInstance().init(...);
}

// track method wraps Amplitude SDK's logEvent()
track(event: Event) {
// use the Amplitude client to logEvents to the server
this.client.logEvent(event.eventType, event.eventProperties);
}

// strongly typed event method wraps "generic" track
myEvent(properties: EventProperties) {
this.track(new MyEvent(properties));
}
}
```

You can override the default client configuration with `client.config`.
Loading