You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<tdmarkdown="span">*optional if userID is set instead*</td>
3
+
<tdmarkdown="span">*required; optional if `userID` is set instead*</td>
4
4
<tdmarkdown="span">String</td>
5
-
<tdmarkdown="span">A pseudo-unique substitute for a User ID, for cases when you don't have an absolutely unique identifier. A userId or an anonymousId is required.
6
-
5
+
<tdmarkdown="span">A pseudo-unique substitute for a User ID, for cases when you don't have an absolutely unique identifier. A `userId` or an `anonymousId` is required.
6
+
7
7
See the [Identities docs](/docs/connections/spec/identify#identities) for more details.
Copy file name to clipboardExpand all lines: src/connections/destinations/catalog/appsflyer/index.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,12 @@ id: 54521fd525e721e32a72ee8f
5
5
---
6
6
[AppsFlyer](https://www.appsflyer.com/) is the world's leading mobile attribution & marketing analytics platform, helping app marketers around the world make better decisions. Our AppsFlyer destination code is open-source. You can browse the code on GitHub for [iOS](https://github.com/AppsFlyerSDK/segment-appsflyer-ios) and [Android](https://github.com/AppsFlyerSDK/AppsFlyer-Segment-Integration).
7
7
8
+
Segment's Appsflyer destination code is open source and available on GitHub. You can view these repositories:
Copy file name to clipboardExpand all lines: src/connections/destinations/catalog/firebase/index.md
+6-39Lines changed: 6 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,14 @@ id: 579a568e80412f644ff19cf7
5
5
---
6
6
Firebase is Google's platform for mobile apps. The Segment Firebase destination requires that you bundle the Firebase SDK with your project. The Segment-wrapped destination code then runs on the user's device, and sends its tracking calls to the Firebase API endpoints, and a copy to Segment for archiving.
7
7
8
-
9
8
> info ""
10
9
> As of October 2019, Firebase replaced the legacy version of Google Analytics Classic for mobile devices. (If you used Google Analytics for mobile, see the [migration guide](/docs/connections/destinations/catalog/google-analytics/migrating/).)
11
10
11
+
Segment's Firebase destination code is open source and available on GitHub. You can view these repositories:
@@ -112,43 +116,6 @@ If you use Segment's React Native source library, you must explicitly bundle the
112
116
4. Change to your iOS directory and run `pod install`.
113
117
5. Add the `analytics-react-native-firebase` module to your `build.gradle` file. (See Step.4 of [Getting Started on Android](/docs/connections/destinations/catalog/firebase/#getting-started-on-android))
114
118
115
-
116
-
## Setting up Firebase with Analytics-Kotlin
117
-
If you're using the [Analytics-Kotlin library](/docs/connections/sources/catalog/libraries/mobile/kotlin-android), follow these steps to set up Firebase with Analytics-Kotlin:
118
-
1. In your top-level `build.gradle` file add these lines:
119
-
```kotlin
120
-
buildscript {
121
-
...
122
-
repositories {
123
-
google()
124
-
}
125
-
dependencies {
126
-
...
127
-
classpath 'com.google.gms:google-services:4.3.5'
128
-
}
129
-
}
130
-
```
131
-
2. In your app-module `build.gradle` file add these lines:
3. Copy the [FirebaseDestination.kt](https://github.com/segmentio/analytics-kotlin/blob/main/samples/kotlin-android-app-destinations/src/main/java/com/segment/analytics/destinations/plugins/FirebaseDestination.kt) file into your project's codebase.
145
-
4. Copy your `google-service.json` file to your app-module.
146
-
5. Go to your project's codebase and add these lines where you intialize the analytics client:
147
-
```kotlin
148
-
val Firebase = FirebaseDestination()
149
-
analytics.add(Firebase)
150
-
```
151
-
152
119
## Identify
153
120
154
121
When you call `identify` Segment will map to the corresponding Firebase Analytics calls:
@@ -273,7 +240,7 @@ Then, enter the deep link URL scheme in your Segment Firebase destination settin
273
240
274
241
### **Conversion Tracking and Adwords Conversions**
275
242
276
-
FirebaseisGoogle's recommended method for reporting conversions to Adwords. To use Firebase, track the conversion events as you normally would with Segment and Segment will send them through to Firebase.
243
+
Firebase is Google's recommended method for reporting conversions to Adwords. To use Firebase, track the conversion events as you normally would with Segment and Segment will send them through to Firebase.
Copy file name to clipboardExpand all lines: src/connections/destinations/catalog/mixpanel/index.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,12 @@ id: 54521fd925e721e32a72eed6
6
6
---
7
7
[Mixpanel](https://mixpanel.com/?utm_source=segmentio&utm_medium=docs&utm_campaign=partners) is an event tracking and segmentation platform for your web and mobile apps. By analyzing the actions your users perform, you can gain a better understanding to drive retention, engagement, and conversion. The client-side Mixpanel Destination code is open-source.
8
8
9
-
You can browse the code on GitHub for [Analytics.js in Device-mode](https://github.com/segmentio/analytics.js-integrations/tree/master/integrations/mixpanel), [iOS](https://github.com/segment-integrations/analytics-ios-integration-mixpanel) and [Android](https://github.com/segment-integrations/analytics-android-integration-mixpanel).
9
+
Segment's Mixpanel destination code is open source and available on GitHub. You can view these repositories:
10
+
-[Analytics.js in Device-mode](https://github.com/segmentio/analytics.js-integrations/tree/master/integrations/mixpanel){:target="_blank"}
### Explicitly Set People Properties and Super Properties
384
389
385
-
Previously, Segment set all traits and properties as both Super Properties and People Properties (If you had Mixpanel People enabled). Now Mixpanel allows you to segment your reports by both People Properties and Super Properties. To give you better precision and control over what property or trait gets set as a Super Property or People Property, you can disable **Set All Traits as Super Properties or People Properties By Default** and pass in the properties or traits that you want to send to Mixpanel as People or Super Properties as shown below. Segment passes through all of Mixpanel's special traits as People Properties so you only need to add the ones that aren't on [this list](#group-using-device-mode).
390
+
Previously, Segment set all traits and properties as both Super Properties and People Properties (If you had Mixpanel People enabled). Now Mixpanel allows you to segment your reports by both People Properties and Super Properties. To give you better precision and control over what property or trait gets set as a Super Property or People Property, you can disable **Set All Traits as Super Properties or People Properties By Default** and pass in the properties or traits that you want to send to Mixpanel as People or Super Properties as shown below. Segment passes through all of Mixpanel's special traits as People Properties so you only need to add the ones that aren't on [this list](#group-using-device-mode).
386
391
387
392
388
393

@@ -498,7 +503,7 @@ analytics.identify(
498
503
499
504
Push notifications are only available for projects bundling the Segment-Mixpanel SDK.
500
505
501
-
> info ""
506
+
> info ""
502
507
> Set up your push notification handlers by calling into native Mixpanel methods. You can read more about how to approach this in the [iOS](/docs/connections/sources/catalog/libraries/mobile/ios/#what-if-your-sdk-doesnt-support-feature-x) and [Android](/docs/connections/sources/catalog/libraries/mobile/android/#how-can-i-use-a-destination-specific-feature) documentation.
The Segment HTTP Tracking API lets you record analytics data from any website or application. The requests hit our servers, and we route your data to any destination you want!
6
+
The Segment HTTP Tracking API lets you record analytics data from any website or application. The requests hit Segment servers, Segment routes your data to any destination you want.
7
7
8
-
Segment has native [sources](/docs/connections/sources/) for most use cases (Javascript, iOS, etc.) that are all built for high-performance and are open-source. But sometimes you may want to send to the HTTP API directly—that's what this reference is for.
8
+
Segment has native [sources](/docs/connections/sources/) for most use cases (like JavaScript and iOS) that are all built for high-performance and are open-source. But sometimes you may want to send to the HTTP API directly—that's what this reference is for.
9
9
10
10
## Headers
11
11
12
12
### Authentication
13
13
14
14
Authenticate to the Tracking API by sending your project's **Write Key** along with a request.
15
-
Authentication uses HTTP Basic Auth, which involves a 'username:password' that is base64 encoded and prepended with the string 'Basic '.
15
+
Authentication uses HTTP Basic Auth, which involves a `username:password` that is base64 encoded and prepended with the string `Basic`.
16
16
17
17
In practice that means taking a Segment source **Write Key**,`'abc123'`, as the username, adding a colon, and then the password field is left empty. After base64 encoding `'abc123:'` becomes `'YWJjMTIzOg=='`; and this is passed in the authorization header like so: `'Authorization: Basic YWJjMTIzOg=='`.
18
18
19
19
### Content-Type
20
20
21
-
In order to send data to our HTTP API, a content-type header must be set to `'application/json'`.
21
+
To send data to Segment's HTTP API, a content-type header must be set to `'application/json'`.
22
22
23
23
## Errors
24
24
25
-
We currently return a `200` response for all API requests so debugging should be done in the Segment Debugger. The only exception is if the request is too large / JSON is invalid it will respond with a `400`.
26
-
27
-
We're hard at work surfacing more errors and more helpful responses to our users. If you have any suggestions, [let us know](https://segment.com/help/contact/)!
25
+
Segment returns a `200` response for all API requests so debugging should be done in the Segment Debugger. The only exception is if the request is too large / JSON is invalid it will respond with a `400`.
28
26
27
+
Segment welcomes feedback on API responses and error messages. [Reach out to support](https://segment.com/help/contact/) with any requests or suggestions you may have.
29
28
30
29
## Rate Limits
31
30
32
-
There is no hard rate limit at which point Segment will drop your data. We ask that if you need to import at a rate exceeding 500 requests per second, [contact us](https://segment.com/help/contact/) first. Requests include batches sent with the [batch method](#batch), which means you can send a large batch of events inside of a single request.
31
+
There is no hard rate limit at which point Segment will drop your data. [Contact support](https://segment.com/help/contact/)if you need to import at a rate exceeding 500 requests per second. Requests include batches sent with the [batch method](#batch), which means you can send a large batch of events inside of a single request.
33
32
34
33
## Max Request Size
35
34
@@ -39,7 +38,7 @@ There is a maximum of `32KB` per normal API request. The `batch` API endpoint a
39
38
40
39
`identify` lets you tie a user to their actions and record traits about them. It includes a unique User ID and any optional traits you know about them.
41
40
42
-
We recommend calling `identify` a single time when the user's account is first created, and only identifying again later when their traits change.
41
+
Segment recommends calling `identify` a single time when the user's account is first created, and only identifying again later when their traits change.
43
42
44
43
Example `identify` call:
45
44
@@ -71,15 +70,15 @@ This call is identifying the user by their unique User ID (the one you know them
71
70
{% include content/spec-field-user-id.md %}
72
71
</table>
73
72
74
-
Find details on the **identify method payload** in our [Spec](/docs/connections/spec/identify/).
73
+
Find details on the **identify method payload** in the [Segment Spec](/docs/connections/spec/identify/).
75
74
76
75
## Track
77
76
78
-
`track` lets you record the actions your users perform. Every action triggers what we call an "event", which can also have associated properties.
77
+
`track` lets you record the actions your users perform. Every action triggers an "event", which can also have associated properties.
79
78
80
79
You'll want to track events that are indicators of success for your site, like **Signed Up**, **Item Purchased** or **Article Bookmarked**.
81
80
82
-
To get started, we recommend tracking just a few important events. You can always add more later!
81
+
To get started, try tracking just a few important events. You can always add more later.
83
82
84
83
Example `track` call:
85
84
@@ -254,7 +253,7 @@ For more details on the `alias` call and payload, check out our [Spec](/docs/con
254
253
255
254
You can import historical data by adding the `timestamp` argument to any of your method calls. This can be helpful if you've just switched to Segment.
256
255
257
-
Historical imports can only be done into destinations that can accept historical timestamped data. Most analytics tools like Mixpanel, Amplitude, Kissmetrics, etc. can handle that type of data just fine. One common destination that does not accept historical data is Google Analytics since their API cannot accept historical data.
256
+
Historical imports can only be done into destinations that can accept historical timestamped data. Most analytics tools like Mixpanel, Amplitude, and Kissmetrics can handle that type of data just fine. One common destination that does not accept historical data is Google Analytics since their API cannot accept historical data.
258
257
259
258
**Note:** If you're tracking things that are happening right now, leave out the `timestamp` and our servers will timestamp the requests for you.
260
259
@@ -377,13 +376,13 @@ POST https://api.segment.io/v1/identify
377
376
}
378
377
```
379
378
380
-
In this case, we're specifying that we want this identify to only go to Mixpanel and Kissmetrics. `'All': false` says that no destination should be enabled unless otherwise specified. `'Mixpanel': true` turns on Mixpanel, etc.
379
+
`'All': false` says that no destination should be enabled unless otherwise specified. `'Mixpanel': true` turns on Mixpanel, `"Kissmetrics": true,` turns on Kissmetrics, and so on.
381
380
382
-
Destination flags are **case sensitive** and match [the destination's name in the docs](/docs/connections/destinations/catalog/) (i.e. "AdLearn Open Platform", "awe.sm", "MailChimp", etc.).
381
+
Destination flags are **case sensitive** and match [the destination's name in the docs](/docs/connections/destinations/catalog/) (i.e. "AdLearn Open Platform", "awe.sm", "MailChimp", and so on).
383
382
384
383
**Note:**
385
384
386
-
- Available at the business level, filtering track calls can be done right from the Segment UI on your source schema page. We recommend using the UI if possible since it's a much simpler way of managing your filters and can be updated with no code changes on your side.
385
+
- Available at the business level, filtering track calls can be done right from the Segment UI on your source schema page. Segment recommends using the UI if possible since it's a much simpler way of managing your filters and can be updated with no code changes on your side.
387
386
388
387
- If you are on a grandfathered plan, events sent server-side that are filtered through the Segment dashboard will still count towards your API usage.
389
388
@@ -401,6 +400,6 @@ When sending a HTTP call from a user's device, you can collect the IP address by
401
400
402
401
1. Double check that you've set up the library correctly.
403
402
404
-
2. Make sure that you're calling one of our API methods once the library is successfully installed—[`identify`](#identify), [`track`](#track), etc.
403
+
2. Make sure that you're calling one of our API methods once the library is successfully installed—[`identify`](#identify), [`track`](#track), and so on.
405
404
406
405
{% include content/troubleshooting-server-integration.md %}
0 commit comments