Skip to content
Tracking SOP

GA4 + GTM Setup

Property, data stream, and container creation from absolute scratch.

GA4 Property + GTM Container Creation

  1. 1.GA4: analytics.google.com → Admin → Create Property → fill in business details → Create a Data Stream (Web) → enter the site URL — generates the Measurement ID (G-XXXXXXXXXX).
  2. 2.Enable Enhanced Measurement on the stream (Page views, Scrolls, Outbound clicks, Form interactions) — but don’t rely on its automatic form-submission detection for a genuine conversion signal without first verifying it actually fires reliably for the specific site’s form implementation (this automatic detection proved unreliable for this project’s native HTML form — see the Core Philosophy page).
  3. 3.Create relevant Custom Dimensions (Admin → Custom definitions) for any parameters the tracking plan needs beyond GA4’s defaults. This project: service, source_page, lead_status (Event-scoped) — the last a placeholder for future offline-status reporting.
  4. 4.Mark the genuine primary conversion event as a Key Event once confirmed firing correctly. This project: generate_lead marked Primary; qualify_lead and close_convert_lead deliberately pre-marked as dormant placeholders, anticipating the offline conversion loop’s later stages.
  5. 5.GTM: tagmanager.google.com → Create Account → fill in details → Container name: the site’s domain → Target platform: Web.
  6. 6.Copy the generated GTM snippet (<head> script + <body> noscript iframe) and add it to the site’s base layout template — this is the only hardcoded tag directly in site code (see Non-Negotiable Architecture Rule).
  7. 7.Build the base GA4 - Configuration tag (Google Tag type, Tag ID: the Measurement ID via a Constant variable, Trigger: Initialization - All Pages).