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
Copy file name to clipboardExpand all lines: src/connections/destinations/catalog/gtag/index.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,18 +4,18 @@ beta: true
4
4
hidden: true
5
5
strat: google
6
6
---
7
+
> note ""
8
+
> The Gtag Destination is in a closed Early Access Preview. To join the preview, contact [Segment Support](https://segment.com/help/contact/) or your CSM. The use is governed by [(1) Segment First Access](/docs/legal/first-access-beta-preview/) and Beta Terms and Conditions and [(2) Segment Acceptable Use Policy](/docs/legal/acceptable-use-policy/).
7
9
8
-
The Gtag Destination is currently in a closed Early Access Preview. If you are interested in joining this preview, please [contact us](https://segment.com/help/contact/) or your CSM if you are interested in testing this new destination. The use is governed by [(1) Segment First Access](https://segment.com/docs/legal/first-access-beta-preview/) and Beta Terms and Conditions and [(2) Segment Acceptable Use Policy](https://segment.com/docs/legal/acceptable-use-policy/).
9
10
11
+
## Getting started
10
12
11
-
## Getting Started
12
-
13
-
The Google Site Tag (Gtag) Device Mode destination allows you to unify tracking across the Google Suite using the gtag.js library. Our early Access Preview Gtag Destination currently only supports sending data to Google Analytics. All you have to do is drop in your **Google Measurement ID** into your settings. You can either choose to use a Web Measurement Id or a Web + App Measurement Id.
13
+
The Google Site Tag (Gtag) Device Mode destination allows you to unify tracking across the Google Suite using the gtag.js library. This early Access Preview Gtag Destination supports sending data to Google Analytics. To enable, add your **Google Measurement ID** into the destination settings. You can either choose to use a Web Measurement Id or a Web + App Measurement Id.
14
14
15
15
16
16
## Page calls
17
17
18
-
When you make a [Page call](/docs/connections/spec/page), Segment send a pageview to Google Analytics. Pageviews can be sent from the browser.
18
+
When you make a [Page call](/docs/connections/spec/page), Segment sends a pageview to Google Analytics. Pageviews send from the browser.
19
19
20
20
The resulting `page` event name in Google Analytics corresponds to the `fullName` of your page event. The `fullName` is a combination of the `category` and `name` parameters. For example, `analytics.page('Home');` produces a `Home` Page event in GA's dashboard, but `analytics.page('Retail Page', 'Home');` produces an event called `Retail Page Home`.
21
21
@@ -34,21 +34,21 @@ analytics.page({
34
34
35
35
### URL Query Strings
36
36
37
-
By default Segment only sends the domain and path to Google Analytics. For example, if someone views the page at on`http://domain.com/page/?xyz=123&r=5`, Segment sends `http://domain.com/page/` URL to Google Analytics.
37
+
By default Segment sends the domain and path to Google Analytics. For example, if someone views the page at `http://domain.com/page/?xyz=123&r=5`, Segment sends `http://domain.com/page/` URL to Google Analytics.
38
38
39
39
In some cases, like using Google Analytics to track search queries, you might want to pass the whole URL including a query string to Google Analytics. To enable this, go to the Gtag destination settings, and check the **Include the Query String** option in the Advanced Options.
40
40
41
41
## UTM parameters
42
42
43
-
Segment highly recommends Analytics.js, the device-mode Javascript library, for collecting UTM parameter data since it all happens automatically.
43
+
Segment recommends Analytics.js, the device-mode Javascript library, for collecting UTM parameter data because Analytics.js collects this data automatically.
44
44
45
-
Your UTM params must be passed in the `context` object in `context.campaign`. For Google Analytics`campaign.name`, `campaign.source` and `campaign.medium` all need to be sent together for things to show up in reports. The other two params (`campaign.term` and `campaign.content`) are both optional, but will be forwarded to GA if you send them to Segment.
45
+
Pass UTM parameters in the `context` object in `context.campaign`. For Google Analytics, send `campaign.name`, `campaign.source` and `campaign.medium` all together to ensure the appear in reports. The other two parameters (`campaign.term` and `campaign.content`) are both optional, but is forwarded to Google Analytics if you send them to Segment.
46
46
47
47
48
48
49
49
## Identify
50
50
51
-
It is against Google's terms of service to pass Personally Identifiable Information (PII) to your Google Analytics reporting interface. For that reason Segment will never pass anything from an [Identify](/docs/connections/spec/identify) call to Google unless you specifically tell us to. You can read about Google's best practices for avoiding this [here](https://support.google.com/analytics/answer/6366371?hl=en).
51
+
Google's terms of service forbid passing Personally Identifiable Information (PII) to your Google Analytics reporting interface. For that reason Segment does not pass data from an [Identify](/docs/connections/spec/identify) call to Google unless you specifically request it. You can read about Google's best practices for avoiding this [here](https://support.google.com/analytics/answer/6366371?hl=en).
52
52
53
53
### User ID
54
54
Google Analytics Universal tracking method allows you to set a user ID for your identified visitors. [Read more here](https://support.google.com/analytics/answer/3123663).
@@ -67,20 +67,20 @@ analytics.identify('12345', {
67
67
});
68
68
```
69
69
70
-
In this example we will set the `User-ID` to `12345` for Google Analytics, but we won't share the `email` or `name` traits with Google.
70
+
In this example the `User-ID`is to `12345` for Google Analytics, but Segment won't share the `email` or `name` traits with Google.
71
71
72
72
> warning ""
73
-
> If you are passing an **email**, **phone number**, **full name** or other PII as the `id` in [Identify](/docs/connections/spec/identify) do not use this feature. That is against the Google Analytics terms of service and your account could be suspended.
73
+
> If you pass an **email**, **phone number**, **full name** or other PII as the `id` in [Identify](/docs/connections/spec/identify) do not use this feature. That is against the Google Analytics terms of service and your Google may suspend your service.
74
74
75
75
### Custom Dimensions
76
-
Google Analytics has multiple scopes for each custom dimension: hit (synonymous with events), session, user, and product (required enhanced ecommerce to be enabled). Our device-mode Analytics.js library supports all of them.
76
+
Google Analytics has several scopes for each custom dimension: hit (synonymous with events), session, user, and product (requires enabling enhanced ecommerce). Segment's device-mode Analytics.js library supports them all.
77
77
78
78
### Configuring Custom Dimensions
79
79
First, configure the Custom Dimensions in your Google Analytics admin page. [Read how to set those up here](https://support.google.com/analytics/answer/2709829?hl=en).
80
80
81
-
Once you are set up in Google Analytics, you are ready to map traits and properties to your custom dimensions.
81
+
Once you've enabled Google Analytics, you can map traits and properties to your custom dimensions.
82
82
83
-
From your Segment Dashboard, open the destinations catalog and select the Gtag destination, then Settings. Locate Custom Dimensions and declare the mapping.
83
+
From your Segment Workspace, open the destinations catalog and select the Gtag destination, then Settings. Locate Custom Dimensions and declare the mapping.
84
84
85
85
Here's an example of mapping "Gender" to dimension "1" and "User Type" to dimension "2":
0 commit comments