Skip to content

Commit 285e234

Browse files
committed
Merge branch 'develop' into DOC-519
2 parents 17a45b8 + 9c34687 commit 285e234

File tree

6 files changed

+43
-70
lines changed

6 files changed

+43
-70
lines changed

src/connections/destinations/catalog/actions-google-analytics-4/index.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,15 @@ Google Analytics 4 has different out-of-the-box reports. Google Analytics 4’s
5757
Segment’s Google Analytics 4 integration is a server-side integration with the GA4 Measurement Protocol API. This is similar to Segment’s Google Universal Analytics cloud-mode integration in that all data is sent directly to Google’s servers. Please note that this means client-side functionality, such as [Enhanced Measurement](https://support.google.com/analytics/answer/9216061){:target='_blank'}, may not be available through Segment. In addition, as Google continues to develop the GA4 Measurement Protocol API ahead of general availability of the API, there may be limitations that impact what can be seen in the Google Analytics 4 reports.
5858

5959
#### Recommended Events
60-
Google Analytics 4 requires the use of [recommended events and properties](https://support.google.com/analytics/answer/9267735){:target='_blank'} to power certain built-in reports. Segment’s Google Analytics 4 destination will automatically map your [Segment spec](/docs/connections/spec/ecommerce/v2) events to the corresponding Google Analytics 4 events and properties. If your Segment events don't follow the Segment spec exactly, you can modify the mappings. For example, Segment maps "Order Completed" events to the Google Analytics 4 “Purchase” event by default. However, if your company uses “Products Purchase” to indicate a purchase, this can be mapped in the Purchase action’s Event Trigger instead.
60+
Google Analytics 4 requires the use of [recommended events and properties](https://support.google.com/analytics/answer/9267735){:target='_blank'} to power certain built-in reports. Segment’s Google Analytics 4 destination provides prebuilt mappings to automatically map your [Segment spec](/docs/connections/spec/ecommerce/v2) events to the corresponding Google Analytics 4 events and properties. If your Segment events don't follow the Segment spec exactly, you can modify the mappings. For example, Segment maps "Order Completed" events to the Google Analytics 4 “Purchase” event by default. If your company uses “Products Purchase” to indicate a purchase, this can be mapped in the Purchase action’s Event Trigger instead.
6161

62-
Segment’s spec doesn't have an equivalent event for every Google Analytics 4 recommended event. If there are other recommended events you would like to send, please use the [Custom Event action](/docs/connections/destinations/catalog/actions-google-analytics-4/#custom-event). For example, to send a `spend_virtual_currency` event, create a mapping for Custom Event, set up your Event Trigger criteria, and input a literal string of "spend_virtual_currency" as the Event Name. You can use the Event Parameters object to add fields that are in the `spend_virtual_currency` event such as `value` and `virtual_currency_name`.
62+
Segment recommends using the prebuilt mappings when possible, however the Segment spec doesn't have an equivalent event for every Google Analytics 4 recommended event. If there are other recommended events you would like to send, please use the [Custom Event action](/docs/connections/destinations/catalog/actions-google-analytics-4/#custom-event). For example, to send a `spend_virtual_currency` event, create a mapping for Custom Event, set up your Event Trigger criteria, and input a literal string of "spend_virtual_currency" as the Event Name. You can use the Event Parameters object to add fields that are in the `spend_virtual_currency` event such as `value` and `virtual_currency_name`.
6363

6464
#### Custom Events
6565
In addition to recommended events, you can also send custom events using the [Custom Event action](/docs/connections/destinations/catalog/actions-google-analytics-4/#custom-event). Custom events are events that you name. Custom events don't appear in most standard reports; you need to set up custom reports for meaningful analysis. To create custom events in the Google Analytics 4 web interface, see Google’s [Modify and create events through the user interface](https://support.google.com/analytics/answer/10085872){:target='_blank'}.
6666

67-
> warning ""
68-
> Don’t create custom events that already correspond to the pre-built mappings that Segment has. Use the standard events defined in [GA4’s doc](https://developers.google.com/analytics/devguides/collection/ga4/reference/events){:target="_blank"} with their corresponding actions.
69-
70-
info "Event naming limitations"
71-
Google Analytics 4 requires that all event names contain only alpha-numeric characters and underscores, and must start with an alphabetic character. Segment replaces spaces in Event Names with an underscore, so that these events are accepted by GA4. For example, Segment renames an event named `Home Profile` to `Home_Profile`. In some cases, GA4 may reject an event outright, due to unsupported characters. For example, an event named `Home | Profile` will be silently rejected due to the pipe character.
67+
> info "Event naming limitations"
68+
> Google Analytics 4 requires that all event names contain only alpha-numeric characters and underscores, and must start with an alphabetic character. Segment replaces spaces in Event Names with an underscore, so that these events are accepted by GA4. For example, Segment renames an event named `Home Profile` to `Home_Profile`. In some cases, GA4 may reject an event outright, due to unsupported characters. For example, an event named `Home | Profile` will be silently rejected due to the pipe character.
7269
7370
In all cases, event names in GA4 are case sensitive. The Custom Event action includes a **Lowercase Event Name** option, to ensure consistency of all events sent to Google. For more information, see Google's articles [Google Analytics 4 event name rules](https://support.google.com/analytics/answer/10085872?hl=en&ref_topic=9756175#event-name-rules){:target='_blank'} and [Event name limitations](https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events?client_type=firebase){:target="_blank"}.
7471

src/connections/destinations/catalog/actions-launchdarkly/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ To get started with LaunchDarkly (Actions):
4444

4545
## Creating LaunchDarkly metrics
4646

47-
In order to take full-advantage of the LaunchDarkly (Actions) Destination, you need to create metrics in LaunchDarkly that correspond to Segment track events. Read [Creating metrics](https://docs.launchdarkly.com/home/experimentation/metrics/index){:target="_blank"} to learn how to create metrics in LaunchDarkly.
47+
In order to take full-advantage of the LaunchDarkly (Actions) Destination, you need to create metrics in LaunchDarkly that correspond to Segment track events. Read [Creating metrics](https://docs.launchdarkly.com/home/experimentation/metrics){:target="_blank"} to learn how to create metrics in LaunchDarkly.
4848

4949
<!-- If applicable, add information regarding the migration from a classic destination to an Actions-based version below -->
5050

src/connections/functions/aws-apis.md

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,41 @@ To set up your functions to call AWS APIs:
1313
2. Create an IAM role in your AWS account with the [minimum set of necessary permissions](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege){:target="_blank"}.
1414
3. Add a trust relationship to your role with the following policy, filling in the principal account ID and external ID from step 1.1:
1515
```json
16-
{
17-
"Version": "2012-10-17",
18-
"Statement": [
19-
{
20-
"Effect": "Allow",
21-
"Principal": {
22-
"AWS": "<PRINCIPAL_ACCOUNT_ID>"
23-
},
24-
"Action": "sts:AssumeRole",
25-
"Condition": {
26-
"StringEquals": {
27-
"sts:ExternalId": "<EXTERNAL_ID>"
16+
{
17+
"Version": "2012-10-17",
18+
"Statement": [
19+
{
20+
"Effect": "Allow",
21+
"Principal": {
22+
"AWS": "<PRINCIPAL_ACCOUNT_ID>"
23+
},
24+
"Action": "sts:AssumeRole",
25+
"Condition": {
26+
"StringEquals": {
27+
"sts:ExternalId": "<EXTERNAL_ID>"
28+
}
2829
}
2930
}
30-
}
31-
]
32-
}
31+
]
32+
}
3333
```
3434

3535
2. Create your function.
3636
<br> Now that you have an IAM role in your AWS account, you can create your source or destination function. Segment recommends you to use function settings to make the IAM role configurable. This allows you to use different roles for different instances of your function and to securely store your external ID value by making it a "sensitive" setting. Here are the required settings:
3737
* **IAM Role ARN**: A string setting that is the ARN for the IAM role above. For example, `arn:aws:iam::1234567890:role/my-secure-role`.
3838
* **IAM Role External ID**: A sensitive string setting that is the external ID for your IAM role.
3939

40-
Below is an example destination function that uploads each event received to an S3 bucket (configured using an additional "S3 Bucket" setting). It uses the built-in local cache to retain S3 clients between requests to minimize processing time and to allow different instances of the function to use different IAM roles.
40+
Below is an example destination function that uploads each event received to an S3 bucket (configured using additional "S3 Bucket" and "S3 Bucket Region" settings). It uses the built-in local cache to retain S3 clients between requests to minimize processing time and to allow different instances of the function to use different IAM roles.
4141

4242
```javascript
4343
async function getS3(settings) {
4444
const ttl = 30 * 60 * 1000; // 30 minutes
45-
const key = settings.iamRoleArn + settings.iamRoleExternalId;
45+
const key = [settings.iamRoleArn, settings.s3Bucket].join();
4646

4747
return cache.load(key, ttl, async () => {
4848
const sts = new AWS.STS();
4949

50-
const creds = await sts
50+
const opts = await sts
5151
.assumeRole({
5252
RoleArn: settings.iamRoleArn,
5353
ExternalId: settings.iamRoleExternalId,
@@ -56,16 +56,14 @@ To set up your functions to call AWS APIs:
5656
.promise()
5757
.then(data => {
5858
return {
59+
region: settings.s3BucketRegion,
5960
accessKeyId: data.Credentials.AccessKeyId,
6061
secretAccessKey: data.Credentials.SecretAccessKey,
6162
sessionToken: data.Credentials.SessionToken
6263
};
63-
})
64-
.catch(err => {
65-
throw err;
6664
});
6765

68-
return new AWS.S3(creds);
66+
return new AWS.S3();
6967
});
7068
}
7169

@@ -81,9 +79,6 @@ To set up your functions to call AWS APIs:
8179
.promise()
8280
.then(data => {
8381
console.log(data);
84-
})
85-
.catch(err => {
86-
throw err;
8782
});
8883
}
8984
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
22
title: 'Snowflake Source'
33
hidden: true
4+
published: false
45
---

src/connections/sources/catalog/libraries/mobile/react-native/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ strat: react-native
44
id: B0X0QmvMny
55
---
66

7-
React Native 2.0 is a major version upgrade to the [existing React Native library](/docs/connections/sources/catalog/libraries/mobile/react-native/classic) that is production-ready. With Analytics for React Native 2.0, you can you can collect analytics in your React Native application and send data to any analytics or marketing tool without having to learn, test, or implement a new API every time. Analytics React Native 2.0 enables you to process and track the history of a payload, while Segment controls the API and prevents unintended operations.
7+
React Native 2.0 is a major version upgrade to the [existing React Native library](/docs/connections/sources/catalog/libraries/mobile/react-native/classic) that is production-ready. With Analytics for React Native 2.0, you can collect analytics in your React Native application and send data to any analytics or marketing tool without having to learn, test, or implement a new API every time. Analytics React Native 2.0 enables you to process and track the history of a payload, while Segment controls the API and prevents unintended operations.
88

99
All of Segment's libraries are open-source, and you can view Analytics for React Native 2.0 on GitHub. For more information, see the [Analytics React Native 2.0 GitHub repository](https://github.com/segmentio/analytics-react-native){:target="_blank"}.
1010

src/connections/storage/catalog/postgres/index.md

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ PostgreSQL, or Postgres, is an object-relational database management system (ORD
88

99
PostgreSQL is ACID-compliant and transactional. PostgreSQL has updatable views and materialized views, triggers, foreign keys; supports functions and stored procedures, and other expandability. Developed by the PostgreSQL Global Development Group, free and open-source.
1010

11+
> note "Segment sources required"
12+
> In order to add a Postgres destination to Segment, you must first add a source. To learn more about sources in Segment, check out the [Sources Overview](/docs/connections/sources) documentation.
13+
1114
## Getting started
1215
Segment supports the following Postgres database providers:
1316
- [Heroku](#heroku-postgres)
@@ -17,57 +20,34 @@ Segment supports the following Postgres database providers:
1720
*_Compose will enter End of Life on March 1, 2023. After this date, all databases on Compose will be disabled and deprovisioned. If you need help selecting another Segment-supported Postgres database provider, contact [Segment Support](https://segment.com/help/contact){:target="_blank"}._
1821

1922
> warning ""
20-
> Segment supports only these Postgres databases. Postgres databases from other providers are not guaranteed to work. For questions or concerns, contact [Segment Support](https://segment.com/help/contact){:target="_blank"}
23+
> Segment supports only these Postgres databases. Postgres databases from other providers are not guaranteed to work. For questions or concerns about Segment-supported Postgres providers, contact [Segment Support](https://segment.com/help/contact){:target="_blank"}.
2124
2225
## Heroku Postgres
2326

2427
This guide explains how to set up a Postgres database with Heroku. Heroku is a cloud-based platform-as-a-service which simplifies the process of setting up and administering a Postgres database.
2528

26-
1. Sign up for a Heroku account.
27-
28-
The first step to setting up Postgres on Heroku is to get a Heroku account. You can sign up for a free account [here](https://signup.heroku.com/identity){:target="_blank"}.
29-
30-
2. Log in to your Heroku account.
31-
32-
You can log in to Heroku [here](https://id.heroku.com/login){:target="_blank"}.
33-
34-
3. Create a new app and go to the Data page.
35-
36-
To get to the Data page, in the Dashboard menu dropdown, select Data.
37-
38-
![](images/heroku1.png)
39-
40-
4. Create a Database.
41-
42-
From the **Data** page, find the Heroku Postgres heading and click **Create one**.
43-
44-
<img src="images/heroku2.png" width="300">
45-
46-
5. Choose your plan.
47-
48-
When you click **Create Database**, a modal appears with your plan choices. Depending on your needs, some plans may be more suitable than others - for example, more expensive plans generally have better performance and more storage. Segment recommends that new customers start with the "Standard 4" plan.
49-
50-
For the fastest sync times, choose the US East region.
29+
> info "First sync duration"
30+
> The initial sync between Segment and Heroku Postgres can take up to 24 hours to complete.
5131
52-
After you configure these settings, click "Login to Install" and/or "Visit Heroku Dashboard to create your first app".
32+
1. [Sign up](https://signup.heroku.com/identity){:target="_blank"} for a Heroku account, or [log in](https://id.heroku.com/login){:target="_blank"} to an existing account.
5333

54-
![](images/heroku3.png)
34+
2. On the Heroku landing page, select **New** and click **Create new app**.
5535

56-
6. From your new app, go to the **Resources** tab and add the "Heroku Postgres" Add-on.
36+
3. Enter a name for your app and select the region where you want to host it. If you want to add your app to a Heroku pipeline, do so here. When you've finished updating your app's settings, click **Create app**.
5737

58-
![](images/heroku4.png)
38+
4. On the Deploy page, select the Resources tab.
5939

60-
7. Click **Provision** and wait for the database provisioning to complete
40+
5. On the Resources page, enter "Heroku Postgres" in the search bar. Select the billing plan that you want to use for this app and click **Submit Order Form**. Segment recommends that customers start with a Standard 4 plan. _Learn more about plan pricing on the [Heroku Postgres pricing page](https://www.heroku.com/pricing#data-services){:target="_blank"}._
6141

62-
Click the "Heroku Postgres :: Database". The database should shift into the Available state.
42+
6. Select the Heroku Postgres add-on you created in the previous step and open the Settings tab. Click the **View Credentials...** button and copy the host, database, user, and password values. You will need this information to connect your database to Segment in a later step.
6343

64-
![](images/heroku5.png)
44+
7. Open the Segment app. On the Overview page, click **Add Destination**.
6545

66-
8. View the database overview and settings.
46+
8. Search for and select the Postgres destination.
6747

68-
Click the tabs to see the database overview and settings. Click **Settings > View credentials** and save these settings for the next steps of the connection process.
48+
9. Choose the source(s) you'd like to connect to Postgres, and click **Next**.
6949

70-
![](images/heroku6.png)
50+
10. Enter the host, database, user, and password values you copied from Heroku in an earlier step, and click **Connect**. If Segment connected to your destination, you'll see the Next Steps screen. If you receive an "Invalid database" error, check that your host, database, user, and password fields match the credentials found in the Settings tab of your Heroku Postgres instance.
7151

7252
## RDS Postgres
7353

0 commit comments

Comments
 (0)