Skip to content

Commit 184272c

Browse files
prigiattiperrutmarkzegarelli
andauthored
Add additional details to FAQ about pageviews (#4943)
* Add additional details to FAQ about pageviews Following this Slack conversation, we are adding additional details on how to fix duplicate pageviews: https://twilio.slack.com/archives/CC97A542H/p1687445286825159?thread_ts=1682325800.051439&cid=CC97A542H * Apply suggestions from code review --------- Co-authored-by: markzegarelli <[email protected]>
1 parent cd1600a commit 184272c

File tree

1 file changed

+13
-5
lines changed
  • src/connections/destinations/catalog/actions-google-analytics-4-web

1 file changed

+13
-5
lines changed

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ To connect the Google Analytics 4 Web destination:
3232

3333
## FAQ & Troubleshooting
3434

35+
### Resolving Duplicate Page Views
36+
37+
When enabled, the **Page Views** advanced setting sends the `page_view` event from Google's gtag.js snippet. It does not prevent sending Segment's `analytics.page()` event. If you enable this setting, once the page loads, Segment sends two `page_view` events to the GA4 SDK, one from the Segment snippet and one from the gtag.js snippet. If you see duplicate `page_view` events in your GA4 dashboard, you need to either:
38+
39+
1. Disable the **Page Views** advanced setting (set it to *False*) so only Segment's `analytics.page()` sends to the GA4 SDK.
40+
2. Edit or disable the preset **Set Configuration Fields** mapping so only the `page_view` included in the gtag.js snippet sends to the GA4 SDK.
41+
42+
The GA4 SDK also tracks a native `page_view` event if you have the [following setting enabled](https://developers.google.com/analytics/devguides/collection/ga4/views?client_type=gtag#manual_pageviews){:target='_blank'} setting enabledin your GA4 account:
43+
44+
45+
46+
47+
3548
### Custom Event Naming
3649

3750
Google Analytics 4 does not accept custom event names that include spaces. Segment replaces spaces in the Event Name in the Custom Event action with an underscore. As a result, you will see custom events snake cased in Google Analytics 4.
@@ -62,9 +75,4 @@ Google may take [24-48 hours](https://support.google.com/analytics/answer/933379
6275

6376
Ensure that at least one mapping has been configured and enabled in the destination mappings for an event you want to send to Google Analytics. If no mappings are enabled, the destination does not send events.
6477

65-
### Page Views
6678

67-
The **Page Views** advanced setting prevents sending the `page_view` included in the gtag.js snippet, not Segment's `analytics.page()` event available in the Analytics.js snippet by default. If you enable this setting, once the page loads, two `page_view` events will still send to the GA4 SDK, one from the Segment snippet and one from the gtag.js snippet. If you see duplicate `page_view` events in your GA4 dashboard, you need to either:
68-
69-
1. Disable the **Page Views** advanced setting (set it to *False*) so only Segment's `analytics.page()` sends to the GA4 SDK. Or,
70-
2. Edit or disable the preset **Set Configuration Fields** mapping so only the `page_view` included in the gtag.js snippet sends to the GA4 SDK.

0 commit comments

Comments
 (0)