Skip to content

Commit b84e068

Browse files
authored
Add section about using Custom Events
- Add excerpt from Google's docs on when to use custom event - Add {:target='_blank'} to open new browser window when customers click on the link
1 parent df2d364 commit b84e068

File tree

1 file changed

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

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ When enabled, the **Page Views** advanced setting sends the `page_view` event fr
5353

5454
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#measure_virtual_pageviews){:target='_blank'} in your GA4 account. To avoid the native GA4 `page_view` event, disable **Page changes based on browser history events** under the advanced settings of the **Page views** section.
5555

56+
### Custom Events
5657

57-
### Custom Event Naming
58+
Before creating a custom event in your mappings, Google recommends that you make sure the event you want to create isn't already collected through an [automatically collected event](https://support.google.com/analytics/answer/9234069){:target='_blank'} or recommended as a [recommended event](https://support.google.com/analytics/answer/9267735){:target='_blank'}. It's always better to use an existing event because these events automatically populate [dimensions and metrics](https://support.google.com/analytics/answer/9143382){:target='_blank'} in your Analytics workspace that are used in your reports. This excerpt was taken directly from [Google's documentation](https://support.google.com/analytics/answer/12229021?hl=en&sjid=15743549721457858295-NA#:~:text=Before%20you%20create%20a%20custom%20event%2C%20make,metrics%20that%20are%20used%20in%20your%20reports.){:target='_blank'} where you can read more!
5859

59-
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.
60+
For custom event naming, 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.
6061

6162
Google Analytics 4 is also case sensitive. If you would like all event names to be lowercase, use the `Lowercase Event Name` setting in the Custom Event action. If this setting is disabled, Google will treat event names with different casing as distinct events. For more information, see [Google Analytics 4 Event name rules](https://support.google.com/analytics/answer/13316687?hl=en&ref_topic=13367860&sjid=2167389739796023681-NA#zippy=%2Cweb){:target="_blank"}.
6263

@@ -96,4 +97,4 @@ Without any further configuration, traffic-source data for `campaign`, `campaign
9697

9798
### Differences between Google Analytics 4 Cloud and Google Analytics 4 Web destinations
9899

99-
Segment's [Google Analytics 4 Cloud](/docs/connections/destinations/catalog/actions-google-analytics-4/) server-side destination uses Google's Measurement Protocol API to send event data server to server, whereas Segment's [Google Analytics 4 Web](/docs/connections/destinations/catalog/actions-google-analytics-4-web/) device-mode destination loads the gtag.js library client-side and uses Segment's event data to map to gtag.js events directly. Each destination has its own advantages and disadvantages. Your choice between the two will depend on your specific use case, technical expertise, and the platforms from which you want to track data.
100+
Segment's [Google Analytics 4 Cloud](/docs/connections/destinations/catalog/actions-google-analytics-4/) server-side destination uses Google's Measurement Protocol API to send event data server to server, whereas Segment's [Google Analytics 4 Web](/docs/connections/destinations/catalog/actions-google-analytics-4-web/) device-mode destination loads the gtag.js library client-side and uses Segment's event data to map to gtag.js events directly. Each destination has its own advantages and disadvantages. Your choice between the two will depend on your specific use case, technical expertise, and the platforms from which you want to track data.

0 commit comments

Comments
 (0)