Google tag (Google Analytics 4)¶
In the Tags block, enable Google Tag (GA4) and fill in:
Field |
Description |
|---|---|
Measurement ID |
The ID of your GA4 web stream, like |
Additional Tag IDs |
Other destinations of the Google tag, separated by commas: |
Google Tag Server URL |
Optional. To serve |
- menu
- Google ‣ Configuration ‣ Settings
- shows
- The Tags block of the Google settings: the Google Tag (GA4) setting enabled with the Measurement ID, Additional Tag IDs, and Google Tag Server URL fields, and below it the Google Tag Manager setting.
- highlight
- The Google Tag (GA4) setting (red frame).
- data
- Demo website, Measurement ID "G-ABCDE12345" (throw-away).
- notes
- English UI, light theme, 1440px width, crop to the Tags block.
The Google tag also carries the Google Ads conversions: with the Google tag disabled, the Google Ads conversions are not sent.
Page views, e-commerce events (product views, cart, checkout, purchase), and lead events are sent to every GA4 destination automatically, in the GA4 recommended event format.
Important
The GA4 events carry the consent signals of the visitor. If analytics is refused, Google receives cookieless pings in Advanced mode and nothing in Basic mode. See Consent mode.
Google Tag Manager¶
Google Tag Manager (GTM) lets you manage your own tags in a container. The app inserts the container on every page and pushes the website events to its data layer, in the format of GA4 e-commerce, so you do not need to edit the code of the website.
Enable Google Tag Manager (GTM) in the Tags block and fill in:
Field |
Description |
|---|---|
Container ID |
Required: the ID of the container, like |
Server URL |
Optional: the address of a server-side GTM container or of a tag gateway path, for example
|
Environment Auth and Environment Preview |
Optional: the |
The data layer receives, with an event_id for deduplication: view_item, view_item_list,
add_to_cart, remove_from_cart, view_cart, add_to_wishlist, begin_checkout,
add_shipping_info, add_payment_info, purchase, and refund (with an ecommerce object), and
the other events (generate_lead, sign_up, login, search, contact, subscribe) with their
parameters at the top level. The page view is left to the own trigger of GTM. If
Enhanced Conversions are enabled, a user_data object with hashed customer data is added
when the visitor accepted marketing cookies.
Note
If purchases are sent from the server, the purchase event of the
data layer is flagged ga4_sent_by_server: true. Exclude it in the trigger of your GA4 event tag
(condition ga4_sent_by_server does not equal true) to avoid counting it twice; the Google Ads
tags can still use it.
Tip
You can use the Google tag and Google Tag Manager together, but do not send the same event to GA4 from both. A common choice is to keep GA4 in the Google tag and to use GTM for the other marketing tags.
Google Analytics options¶
In the Google Analytics block of the settings:
GA4 User ID: sends a pseudonymous user ID (a keyed hash of the customer, never the email address) for logged-in customers, so that GA4 can join the visits of the same customer on several devices. Enable Google signals in GA4 to use it.
GA4 Debug Mode: shows the events of the website in the GA4 DebugView. See Testing and troubleshooting. Disable it in production.
See also