Skip to content

Commit b68bb84

Browse files
committed
DOC-146 Data Res Update
2 parents 83fc4a9 + bc08b92 commit b68bb84

File tree

39 files changed

+656
-104
lines changed

39 files changed

+656
-104
lines changed

src/_data/sidenav/strat.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
sections:
33
- slug: adobe
4-
section_title: Adobe Analytics
4+
section_title: Adobe Integrations
55
section:
66
- path: /connections/destinations/catalog/adobe-analytics
77
title: Adobe Analytics destination
@@ -15,6 +15,13 @@ sections:
1515
title: Adobe Analytics Heartbeat
1616
- path: /connections/destinations/catalog/adobe-analytics/best-practices
1717
title: Adobe Analytics best practices
18+
- path: /connections/destinations/catalog/marketo-v2
19+
title: Marketo destination
20+
- path: /connections/destinations/catalog/marketo-static-lists
21+
title: Marketo static lists destination (Personas)
22+
- path: /connections/sources/catalog/cloud-apps/marketo
23+
title: Marketo cloud source
24+
1825

1926
- slug: facebook
2027
section_title: Facebook Integrations
@@ -78,6 +85,7 @@ sections:
7885
title: Salesforce Marketing Cloud cloud source
7986

8087

88+
8189
- slug: ajs
8290
section_title: Analytics.js Documentation
8391
section:

src/_includes/content/react-dest.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!-- Usage: `include react-dest only={ios|android}` -->
2+
<!-- in the file we're pulling from the API, "name" corresponds with the path to the yml blob for a specific destination.-->
3+
{% assign currentSlug = page.url | split: "/" | last %}
4+
{% assign thisDest = site.data.catalog.destinations.items | where: "slug", currentSlug | first %}
5+
{% assign thisDestName = thisDest.display_name %}
6+
{% assign thisDestRNspecific = include.only %}
7+
8+
9+
{% if thisDestRNspecific %}
10+
<div class="premonition info">
11+
<div class="fa fa-info-circle"></div>
12+
<div class="content"><p>
13+
The {{thisDestName}} device-mode destination SDK is only available for {{thisDestRNspecific}} in React Native.
14+
</p></div></div>
15+
{%endif%}
16+
17+
To add the {{thisDestName}} device-mode SDK to a [React Native](/docs/connections/sources/catalog/libraries/mobile/react-native/) project:
18+
1. Navigate to the root folder of your project, and run a `yarn add {{thisDestName | downcase | replace: " ", "-" }}{% if thisDestRNspecific %}-{{thisDestRNspecific}}{%endif%}` command to add the destination SDK to your project.
19+
2. Add an `import` statement to your project, as in the example below.
20+
```js
21+
import {{thisDestName | replace: " ", "" }} from '@segment/analytics-react-native-{{thisDestName | downcase | replace: " ", "" }}{% if thisDestRNspecific %}-{{thisDestRNspecific}}{%endif%}'
22+
```
23+
3. In the same project file, add the destination to the `using` list in the `await` command.
24+
```js
25+
await analytics.setup('YOUR_WRITE_KEY', {
26+
// Add any of your Device-mode destinations. This ensures they load before continuing.
27+
using: {{thisDestName | replace: " ", "" }}
28+
// ...
29+
})
30+
```
31+
4. Finally, change to your iOS development folder ( `cd ios` ) and run `pod install`.

src/_sass/components/_stage.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
&__body {
2222
flex: 1;
2323
max-width: 100%;
24+
min-width: 0;
2425
}
2526
}

src/connections/data-residency.md

Lines changed: 154 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,170 @@
11
---
22
title: Data Residency
3+
beta: true
34
---
45
Segment offers customers the option to mitigate risk by providing regional infrastructure across Europe, Middle East, Africa and Asia Pacific. The default region for all customers is in Oregon, United States. The regional infrastructure has the same [rate limits and SLA](/docs/connections/rate-limits/) as the default region.
56

6-
## Agree to Terms
7+
## Enable Local Data Ingest and Storage
8+
9+
This feature is in Public Preview. You can enable Local Data Ingest and Storage from the Regional Settings tab within your Workspace settings. Enabling the feature here makes the feature available to both client-side and server-side sources.
10+
11+
![enable](images/enable-regional-ingest.png)
12+
13+
## Local Data Ingest
14+
15+
Local Data Ingest enables you to send data to Segment from both Client-side and Server-side sources through locally hosted API ingest points. The regional infrastructure can fail-over across locations within a region, but never across regions.
16+
17+
### Client-side sources
18+
19+
You can configure Segment's client-side SDKs for Javascript, iOS, Android, and React Native sources to send data to a regional host after you've updated the Ingest Region in that source's settings.
20+
21+
![ingest region](images/regional-ingest.png)
22+
23+
All regions are configured on a **per-source** basis. You'll need to configure the region for each source separately if you do not want to use the default region (Oregon). All Segment client-side SDKs read this setting and update themselves automatically to send data to new endpoints when the app is reloaded. You do not need to change code when you switch regions.
24+
25+
### Server-side and project sources
26+
27+
When you send data from a server-side or project source, you can use the `host` configuration parameter to send data to the desired region:
28+
29+
1. Oregon (Default) — `api.segment.io/v1`
30+
2. Dublin — `in.eu2.segmentapis.com/v1`
31+
3. Singapore — `in.ap1.segmentapis.com/v1`
32+
4. Sydney — `in.au1.segmentapis.com/v1`
33+
34+
## Local Data Storage
35+
36+
Local Data Storage allows you to preserve your raw events in Amazon S3 buckets hosted regionally. These buckets are hosted by you, in your desired region.
737

838
> note ""
9-
> This feature is in Public Preview.
39+
> Configure Local Data Storage on new sources instead of enabling on an existing source to avoid deletion of historical data and a change in retention policy. Historical data that is expired due to a retention policy cannot be replayed at a time in the future. Historical data cannot migrate from the US to your regional buckets.
40+
41+
### Pre-requisites
42+
43+
To begin with Local Data Storage, complete the following steps in your AWS account:
44+
45+
1. Create an S3 bucket in the preferred region
46+
2. Create a folder named `segment-logs` in the new bucket
47+
3. Edit the bucket policy to allow Segment access to the S3 bucket
48+
```json
49+
{
50+
"Version": "2008-10-17",
51+
"Id": "Policy1425281770533",
52+
"Statement": [
53+
{
54+
"Sid": "AllowSegmentUser",
55+
"Effect": "Allow",
56+
"Principal": {
57+
"AWS": "arn:aws:iam::107630771604:user/s3-copy"
58+
},
59+
"Action": "s3:PutObject",
60+
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/segment-logs/*"
61+
}
62+
]
63+
}
64+
```
65+
**Note**: `Resource` property string must end with `/*`.
66+
67+
Segment requires this access to write raw data to your regionally hosted S3 bucket. Specifically, this allows Segment to use `s3:PutObject`. To enable encryption at rest, use the default S3 mechanism. If you have server-side encryption enabled with AWS KMS managed keys, see the additional [required configuration step](/docs/connections/storage/catalog/amazon-s3/#encryption). To edit the bucket policy, right-click the bucket name in the AWS management console, and select **Edit policy**.
68+
69+
4. Create a new IAM role in your AWS account with a trust relationship to the role which allows Segment to use the Segment `workspace_id` as `externalID`.
70+
```json
71+
{
72+
"Version": "2012-10-17",
73+
"Statement": [
74+
{
75+
"Sid": "",
76+
"Effect": "Allow",
77+
"Principal": {
78+
"AWS": [
79+
"arn:aws:iam::294048959147:role/segment-regional-archives-production"
80+
"arn:aws:iam::294048959147:role/warehouse-replays"
81+
]
82+
},
83+
"Action": "sts:AssumeRole",
84+
"Condition": {
85+
"StringEquals": {
86+
"sts:ExternalId": [
87+
"YOUR_WORKSPACE_ID"
88+
]
89+
}
90+
}
91+
}
92+
]
93+
}
94+
```
95+
5. Attach this IAM policy to the role defined in Step 4.
96+
```json
97+
{
98+
"Version": "2012-10-17",
99+
"Statement": [
100+
{
101+
"Sid": "ListObjectsInBucket",
102+
"Effect": "Allow",
103+
"Action": "s3:ListBucket",
104+
"Resource": [
105+
"arn:aws:s3:::YOUR_BUCKET_NAME/*",
106+
"arn:aws:s3:::YOUR_BUCKET_NAME"
107+
]
108+
},
109+
{
110+
"Sid": "AllObjectActions",
111+
"Effect": "Allow",
112+
"Action": "s3:*Object*",
113+
"Resource": [
114+
"arn:aws:s3:::YOUR_BUCKET_NAME/*",
115+
"arn:aws:s3:::YOUR_BUCKET_NAME"
116+
]
117+
},
118+
{
119+
"Sid": "AllowKMS",
120+
"Effect": "Allow",
121+
"Action": "kms:GenerateDataKey",
122+
"Resource": "*"
123+
}
124+
]
125+
}
126+
```
127+
128+
> note ""
129+
> This access allows Segment to run local deletions jobs from regionally hosted data for a given user ID.
130+
131+
### Local Data Storage configuration
132+
133+
After you configure the policy and roles, as defined above, navigate to the Settings tab of the source for which you want to store data regionally.
134+
135+
![local storage](images/regional-data-source.png)
136+
137+
To complete the configuration of Local Data Storage:
138+
139+
1. Enter the name of the S3 Bucket you created in the Pre-requisites section
140+
2. Add a regional label to help locate the bucket from AWS at a later date. For example, `us-west2-294048959147` or `country-REGION-AWS_ACCOUNT`
141+
3. Enter the ARN of the IAM role set up as a pre-requisite and click **Save**
142+
4. Navigate to *Privacy > Settings > Data Retention*
143+
5. Identify the Source in the source-level archive retention periods list
144+
6. Set the Retention for this source to the suggested value of `7 days` and click **Save**
145+
146+
The Local Data Storage bucket will take roughly one hour to receive data.
10147

11-
Before you can enable Regional Data Ingest and Storage on your workspace, you must read and agree to the [First Access and Beta Terms and Conditions](https://segment.com/legal/first-access-beta-preview/) and [Acceptable Use Policy](https://segment.com/legal/acceptable-use-policy/).
148+
### Deletion from Local Data Storage
12149

13-
Once agreed to, click **Accept Terms** to enable the feature on your active workspace.
150+
Local Data Storage offers the same ability to delete end-user data when they revoke or alter their consent to have data collected, as long as they can be identified by a `userId`. For example, if an end-user invokes their Right to Object or Right to Erasure under the GDPR or CCPA, you can use these features to:
151+
- block ongoing data collection for that user
152+
- delete all historical data about them from Segment's systems, connected S3 buckets and warehouses, and supported downstream partners
14153

15-
![](images/enable-regaional-ingest.png)
154+
Contact [Segment Support](https://segment.com/help/contact/) to initiate a deletion and provide a valid `userId` for each user to be deleted. Deletion requests are run within the region, and have a 30 day SLA, but requires that the raw data is accessible to Segment in an unaltered state. Deletion from Local Data Storage is not available from the [Privacy Portal](/docs/privacy/user-deletion-and-suppression/#deletion-requests) or through the API.
16155

17-
## Enable Regional Data Ingest
156+
> note "Business Plan Customers"
157+
> If you use this feature to delete data, you cannot Replay the deleted data at the same time. For standard Replay requests, you must wait for any pending deletions to complete. You cannot submit new deletions requests for the period of time that Segment replays data for you.
18158
19-
Regional Data Ingest enables you to send data to segment from either Client-side or Server-side sources, through locally hosted API ingest points. The regional infrastructure has the capability to fail-over across locations within the region, but will not cross regions.
159+
### Replays from Local Data Storage
20160

21-
### Client-side Sources
161+
Local Data Storage supports [Replays](/docs/guides/what-is-replay/#replays-for-tooling-changes) to both existing and new tools. To request a Replay, [contact Segment](https://segment.com/help/contact/) with the following:
162+
- Source ID
163+
- Date Range
164+
- Destination
22165

23-
You can configure Segment's client-side SDKs for Javascript, iOS, Android, and React Native sources to send data to a regional host by selecting the ingest region on a per-source basis.
166+
Segment will initiate Replay jobs and update status as they progress.
24167

25-
![](images/regional-ingest.png)
168+
### Debugging and support
26169

170+
The Segment Customer Success and Support Engineering teams do not have access to customer hosted regional buckets used for Local Data Storage and cannot provide event level debug support.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ analytics = new Analytics.Builder(this, "write_key")
106106

107107
After you build and release to the App Store, Segment automatically starts translating and sending your data to Adjust.
108108

109+
### React Native
110+
111+
{% include content/react-dest.md %}
112+
109113
### Server
110114

111115
Our Cloud-mode integration allows you to send *supplemental* data to Adjust. This, however, *does not* include attribution events. If you are relying on the Adjust server-side component, and you are not bundling the Segment-Adjust SDK, your installs will not be attributed. E-commerce events and other general `track` events are supported out of the box. You **must** map your `track` events to your custom Adjust Event Token in your [Adjust destination settings](#map-your-events-to-custom-adjust-event-tokens).

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ In addition to the docs below, Amplitude created a [integration guide](https://d
4343

4444
If you included Segment's Javascript snippet on your page, then Amplitude's SDK loads on your page automatically and you can use Segment's to begin sending events right away.
4545

46+
### React Native device mode set up
47+
48+
{% include content/react-dest.md %}
49+
4650

4751
## Page and Screen
4852

@@ -446,7 +450,7 @@ with the user's `userId`, or what Amplitude refers to, respectively, as a
446450

447451
By default, Segment does **NOT** send Alias events to Amplitude. To forward Alias events from Segment, go to your Amplitude destination settings in the Segment web app, and set the **Enable Alias** setting to "on". Once enabled, Segment forwards both client-based and server-based Alias calls. Segment processes _all_ Alias calls before sending them to Amplitude, so you won't see a `usermap` request to Amplitude if you check your browser's Network activity after making a Segment Alias call.
448452

449-
> note ""
453+
> note ""
450454
> To use Alias, you must have the Amplitude Portfolio add-on enabled.
451455
452456
For more information, see the [Segment Spec page for the Alias method](https://segment.com/docs/connections/spec/alias/) and [the Amplitude `usermap` documentation](https://amplitude.zendesk.com/hc/en-us/articles/360002750712-Portfolio-Cross-Project-Analysis#user-mapping-aliasing).

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ If you have the **Can Omit AppsFlyerID** setting enabled, but aren't sending an
5454

5555
To prevent this, you can enable the new **Fallback to send IDFV when advertisingId key not present** setting in your AppsFlyer destination settings. With this enabled, when you send data using cloud-mode (through the Segment servers), Segment sends the user's IDFV (the `device.id`) when `device.advertisingId` is missing or blank AND “Can Omit AppsFlyerID” is enabled.
5656

57+
#### Additional React Native device-mode set up
58+
59+
{% include content/react-dest.md %}
60+
5761
### Server
5862

5963
AppsFlyer offers an **augmentative** server-side [HTTP API](https://support.appsflyer.com/hc/en-us/articles/207034486-Server-to-Server-In-App-Events-API-HTTP-API-) intended for use along side the AppsFlyer mobile SDK. Use the cloud-mode destination _with_ the mobile SDK to link out-of-app events (such as website or offline purchases) with attributed users and devices.

src/connections/destinations/catalog/branch-metrics/index.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,28 @@ This document was last updated on November 13, 2019. If you notice any gaps, out
3131
5. Paste the Branch Key in the destination settings and click **Save**.
3232

3333

34+
### Adding Branch device-mode SDKs for React Native
35+
36+
<!-- LR, Mar2021: this should be a `react-dest` include but Branch changed their name from Branch-Metrics-->
37+
38+
To add the Branch device-mode SDK to a [React Native](/docs/connections/sources/catalog/libraries/mobile/react-native/) project:
39+
1. Navigate to the root folder of your project, and run a `yarn add branch` command to add the destination SDK to your project.
40+
2. Add an `import` statement to your project, as in the example below.
41+
```js
42+
import Branch from '@segment/analytics-react-native-branch'
43+
```
44+
3. In the same project file, add the destination to the `using` list in the `await` command.
45+
```js
46+
await analytics.setup('YOUR_WRITE_KEY', {
47+
// Add any of your Device-mode destinations. This ensures they load before continuing.
48+
using: Branch
49+
// ...
50+
})
51+
```
52+
4. Finally, change to your iOS development folder ( `cd ios` ) and run `pod install`.
53+
54+
55+
3456
## Identify
3557

3658
If you're not familiar with the Segment Specs, take a look to understand what the [Identify method](https://segment.com/docs/connections/spec/identify/) does. An example iOS call would look like:

0 commit comments

Comments
 (0)