The Google tag and GA4 configuration
One Google tag, one measurement ID, settings that live in one place — and how to send your first event through it.
Get the measurement ID
In GA4: Admin → Data streams → your web stream. The measurement ID is G- followed by ten characters. That is the only thing the Google tag needs.
While you're there, note two settings on the same screen that people forget about for months:
- Enhanced measurement — the toggles for automatic scroll/outbound/download/video/form events. Decide deliberately. If you're going to track forms yourself in GTM, turn form interactions off here or you'll get both.
- Configure tag settings → Define internal traffic — your office IP. Otherwise your own testing is in the data.
Create the Google tag in GTM
Tags → New → Tag Configuration → Google tag.
- Tag ID: the
G-ID. Better: create a Constant variable first (Const – GA4 ID=G-…) and reference it as{{Const – GA4 ID}}. Every other GA4 tag will reference the same constant. - Configuration settings: where per-property settings go —
send_page_view(leave true),allow_google_signals,cookie_domainfor cross-subdomain setups. If you have more than a couple, put them in a Google Tag: Configuration Settings variable so they're in one place. - Shared event settings: parameters you want on every event — things like
content_groupor auser_typefrom the dataLayer. Again, a variable (Google Tag: Event Settings) keeps it reusable. - Firing trigger: Initialization – All Pages. Not All Pages — Initialization fires earlier, and consent defaults (Module 3) need to be in place before this tag runs.
Save. Name it Google tag – GA4 or similar. One of these per measurement ID. Two Google tags with the same ID is a critical auditor finding: it sends two page_views per page.
The GA4 Event tag
Every non-automatic event is a Google Analytics: GA4 Event tag:
- Measurement ID:
{{Const – GA4 ID}}again. - Event name: exact, snake_case, from the recommended list when one fits:
add_to_cart,generate_lead,login. - Event parameters: name → value pairs. Values are almost always variables:
value→{{DL – ecommerce.value}}. - More settings → Ecommerce → Send Ecommerce data with source Data Layer — this reads the whole
ecommerceobject from the dataLayer and you don't type the items out at all. - Firing trigger: a Custom Event trigger matching the dataLayer event name.
One tag per event name. Don't build a tag per page; the trigger carries the "where."
Your first pass on the sandbox
- In the sandbox store, enter your container ID. The store now loads your container on every sandbox page.
- In GTM, click Preview, enter
https://tagintact.com/sandbox, connect. - In the Preview window's left timeline you'll see
Consent Initialization,Initialization,Container Loaded, then the store'sview_item_listpush. Click the Container Loaded row: your Google tag should be under Tags Fired. - Open DevTools → Network → filter
collect. One request,en=page_view,tid=your ID. - Click a product. In Preview, a
view_itemevent appears in the timeline. No tags fired yet — you haven't built the event tag. Build it now: GA4 Event tag, event nameview_item, ecommerce data from dataLayer, Custom Event triggerview_item. Refresh the sandbox page: now the tag fires, and a secondcollectrequest showsen=view_itemwith thepr1item in the payload.
You just did fire → collect → send, and proved all three. That loop is the rest of the course.
The sandbox store fires real ecommerce dataLayer events and loads your GTM container, so you can build the tag from this lesson against live events.
Open the sandbox