Skip to content

Commit 22a5a42

Browse files
authored
Merge pull request #266 from segmentio/repo-sync
repo sync
2 parents 9bf3657 + 02b0edf commit 22a5a42

File tree

8 files changed

+50
-72
lines changed

8 files changed

+50
-72
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<tr>
22
<td markdown="span">`anonymousId`</td>
3-
<td markdown="span">*optional if userID is set instead*</td>
3+
<td markdown="span">*required; optional if `userID` is set instead*</td>
44
<td markdown="span">String</td>
5-
<td markdown="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+
<td markdown="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+
77
See the [Identities docs](/docs/connections/spec/identify#identities) for more details.
88
</td>
99
</tr>

src/_includes/content/spec-field-user-id.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<tr>
22
<td markdown="span">`userId`</td>
3-
<td markdown="span">*optional if anonymousID is set instead*</td>
3+
<td markdown="span">*required; optional if `anonymousID` is set instead*</td>
44
<td markdown="span">String</td>
55
<td markdown="span">Unique identifier for the user in your database.
66

7-
A userId or an anonymousId is required.
7+
A `userId` or an `anonymousId` is required.
88

99
See the [Identities docs](/docs/connections/spec/identify#identities) for more details.
1010
</td>

src/connections/destinations/catalog/amplitude/index.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ platform for your web and mobile apps. By analyzing the actions your users
99
perform, you can gain a better understanding to drive retention, engagement,
1010
and conversion.
1111

12-
Segment's Amplitude destination code is open source and available on GitHub. Feel free to check it out:
13-
- [JavaScript](https://github.com/segmentio/analytics.js-integrations/tree/master/integrations/amplitude)
14-
- [iOS](https://github.com/segment-integrations/analytics-ios-integration-amplitude)
15-
- [Android](https://github.com/segment-integrations/analytics-android-integration-amplitude)
16-
12+
Segment's Amplitude destination code is open source and available on GitHub. You can view these repositories:
13+
- [Android](https://github.com/segment-integrations/analytics-android-integration-amplitude){:target="_blank"}
14+
- [iOS](https://github.com/segment-integrations/analytics-ios-integration-amplitude){:target="_blank"}
15+
- [JavaScript](https://github.com/segmentio/analytics.js-integrations/tree/master/integrations/amplitude){:target="_blank"}
16+
- [Kotlin](https://github.com/segment-integrations/analytics-kotlin-amplitude){:target="_blank"}
17+
- [Swift](https://github.com/segment-integrations/analytics-swift-amplitude){:target="_blank"}
1718

1819
In addition to the docs below, Amplitude created a [integration guide](https://developers.amplitude.com/docs/segment-amplitude-integration).
1920

src/connections/destinations/catalog/appsflyer/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ id: 54521fd525e721e32a72ee8f
55
---
66
[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).
77

8+
Segment's Appsflyer destination code is open source and available on GitHub. You can view these repositories:
9+
- [Android](https://github.com/AppsFlyerSDK/appsflyer-segment-android-plugin){:target="_blank"}
10+
- [iOS](https://github.com/AppsFlyerSDK/segment-appsflyer-ios){:target="_blank"}
11+
- [Kotlin](https://github.com/segment-integrations/analytics-kotlin-appsflyer){:target="_blank"}
12+
- [Swift](https://github.com/segment-integrations/analytics-swift-appsflyer){:target="_blank"}
13+
814
## Getting Started
915

1016
{% include content/connection-modes.md %}

src/connections/destinations/catalog/firebase/index.md

Lines changed: 6 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ id: 579a568e80412f644ff19cf7
55
---
66
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.
77

8-
98
> info ""
109
> 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/).)
1110
11+
Segment's Firebase destination code is open source and available on GitHub. You can view these repositories:
12+
- [Android](https://github.com/segment-integrations/analytics-android-integration-firebase){:target="_blank"}
13+
- [iOS](https://github.com/segment-integrations/analytics-ios-integration-firebase){:target="_blank"}
14+
- [Kotlin](https://github.com/segment-integrations/analytics-kotlin-firebase){:target="_blank"}
15+
- [Swift](https://github.com/segment-integrations/analytics-swift-firebase){:target="_blank"}
1216

1317
## Getting Started on Android
1418

@@ -112,43 +116,6 @@ If you use Segment's React Native source library, you must explicitly bundle the
112116
4. Change to your iOS directory and run `pod install`.
113117
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))
114118

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:
132-
```kotlin
133-
...
134-
plugins {
135-
id 'com.google.gms.google-services'
136-
}
137-
138-
dependencies {
139-
...
140-
implementation platform('com.google.firebase:firebase-bom:28.2.1')
141-
implementation 'com.google.firebase:firebase-analytics-ktx'
142-
}
143-
```
144-
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-
152119
## Identify
153120

154121
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
273240

274241
### **Conversion Tracking and Adwords Conversions**
275242

276-
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.
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.
277244

278245
### Troubleshooting
279246

src/connections/destinations/catalog/mixpanel/index.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ id: 54521fd925e721e32a72eed6
66
---
77
[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.
88

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"}
11+
- [Android](https://github.com/segment-integrations/analytics-android-integration-mixpanel){:target="_blank"}
12+
- [iOS](https://github.com/segment-integrations/analytics-ios-integration-mixpanel){:target="_blank"}
13+
- [Swift](https://github.com/segment-integrations/analytics-swift-mixpanel){:target="_blank"}
14+
- [Kotlin](https://github.com/segment-integrations/analytics-kotlin-mixpanel){:target="_blank"}
1015

1116
## Getting Started
1217

@@ -382,7 +387,7 @@ analytics.track({
382387

383388
### Explicitly Set People Properties and Super Properties
384389

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).
386391

387392

388393
![mixpanel people properties list](images/mixpanelpeoplesuperprops.png)
@@ -498,7 +503,7 @@ analytics.identify(
498503

499504
Push notifications are only available for projects bundling the Segment-Mixpanel SDK.
500505

501-
> info ""
506+
> info ""
502507
> 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.
503508
504509
### In-App Notifications

src/connections/sources/catalog/libraries/server/http-api/index.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,32 @@ title: HTTP Tracking API Source
33
redirect_from: '/connections/sources/catalog/libraries/server/http/'
44
id: iUM16Md8P2
55
---
6-
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.
77

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.
99

1010
## Headers
1111

1212
### Authentication
1313

1414
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`.
1616

1717
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=='`.
1818

1919
### Content-Type
2020

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'`.
2222

2323
## Errors
2424

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`.
2826

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.
2928

3029
## Rate Limits
3130

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.
3332

3433
## Max Request Size
3534

@@ -39,7 +38,7 @@ There is a maximum of `32KB` per normal API request. The `batch` API endpoint a
3938

4039
`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.
4140

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.
4342

4443
Example `identify` call:
4544

@@ -71,15 +70,15 @@ This call is identifying the user by their unique User ID (the one you know them
7170
{% include content/spec-field-user-id.md %}
7271
</table>
7372

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/).
7574

7675
## Track
7776

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.
7978

8079
You'll want to track events that are indicators of success for your site, like **Signed Up**, **Item Purchased** or **Article Bookmarked**.
8180

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.
8382

8483
Example `track` call:
8584

@@ -254,7 +253,7 @@ For more details on the `alias` call and payload, check out our [Spec](/docs/con
254253

255254
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.
256255

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.
258257

259258
**Note:** If you're tracking things that are happening right now, leave out the `timestamp` and our servers will timestamp the requests for you.
260259

@@ -377,13 +376,13 @@ POST https://api.segment.io/v1/identify
377376
}
378377
```
379378

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.
381380

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).
383382

384383
**Note:**
385384

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.
387386

388387
- 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.
389388

@@ -401,6 +400,6 @@ When sending a HTTP call from a user's device, you can collect the IP address by
401400

402401
1. Double check that you've set up the library correctly.
403402

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.
405404

406405
{% include content/troubleshooting-server-integration.md %}

0 commit comments

Comments
 (0)