Digital Dan
← All posts

How to install Google Analytics 4 (GA4) with Google Tag Manager (2026)

How to add the Google Analytics 4 (GA4) tag to your website using Tag Manager

To install GA4 with Google Tag Manager, create a Google tag in your container, enter your GA4 measurement ID (it starts with G-) as the Tag ID, fire it on the Initialization - All Pages trigger, test it in Preview mode and publish. That one tag sends page views and enhanced measurement events to GA4; anything else you want to measure (form submissions, clicks, calls) is added with Google Analytics: GA4 Event tags.

Want GA4 installed and tested properly the first time? I set up GA4 and Tag Manager for businesses that run ads. Get in touch about a GA4 and Tag Manager setup.

This replaces my 2022 version of this guide. The “GA4 Configuration” tag it used no longer exists: Google replaced it with the Google tag (formerly gtag.js, the global site tag), and the old Tag Assistant Legacy extension is gone too. If you’re new to Tag Manager, start with what Google Tag Manager is and what it’s used for.

Before you start

You need three things:

  • A GA4 property with a web data stream for your site.
  • A Tag Manager web container with its snippet installed on every page of the site (in the <head> and right after the opening <body> tag).
  • Editor access (or higher) to the GA4 property and permission to publish in the container.

Then check one more thing before you add anything: is GA4 already on the site? Themes, WordPress plugins, Shopify, Wix and other platforms often add the Google tag by themselves. If GA4 is hard-coded and you add it again in Tag Manager, every page view is counted twice. I explain how to check this in Google Tag Manager vs the Google tag (gtag.js).

Step 1: Find your GA4 measurement ID

  1. In Google Analytics, click Admin (the gear icon at the bottom left).
  2. Under Data collection and modification, click Data streams.
  3. Click your web data stream. If you don’t have one, click Add stream → Web and follow the steps.
  4. In Stream details, copy the Measurement ID (G-XXXXXXXXXX).

Stream details of a GA4 web data stream with the Measurement ID and its copy icon highlighted

While you’re on this screen, look at Enhanced measurement. It is on by default and automatically sends page views, scrolls, outbound clicks, site search, video engagement, file downloads and form interactions. Remember this list: it matters in the common mistakes below.

Step 2: Create the Google tag in Tag Manager

  1. Open your container in Tag Manager and go to Tags → New.
  2. Name the tag clearly, for example “Google tag - GA4”.
  3. Click Tag Configuration and choose Google tag.
  4. In Tag ID, paste your measurement ID.

A new tag in Google Tag Manager, with the tag name field and the Tag Configuration edit button

That’s all a basic install needs. The Google tag loads GA4 on every page, sets the Analytics cookies and sends the automatically collected and enhanced measurement events.

Optional: configuration settings and event settings

The Google tag has two optional sections. They replaced the old “Fields to Set” option:

  • Configuration settings: parameters set when the tag loads. Examples: send_page_view (set to false only if you send page views yourself), server_container_url (if you use a server-side container) or debug_mode while testing.
  • Shared event settings: parameters sent with every event, such as currency, and user properties (up to 25 custom ones per GA4 property).

If you reuse the same settings in more than one tag, create a Google Tag Configuration Settings or Google Tag Event Settings variable under Variables → New and select it in the tag, instead of typing the same parameters again.

Step 3: Choose the right trigger

Under Triggering, choose Initialization - All Pages, not All Pages. This is what Google recommends for the Google tag.

The difference is timing. Every web container has three built-in triggers that fire on every page, in this order:

TriggerFiresUse it for
Consent Initialization - All PagesFirst, before anything elseYour cookie banner (CMP) template and default consent
Initialization - All PagesBefore all other triggers except Consent InitializationThe Google tag
All Pages (Page View)When the container loadsMost other page-level tags

Firing the Google tag on Initialization means it has loaded before your GA4 event tags and Google Ads tags fire, so they inherit its settings.

If you have visitors from the European Economic Area, the UK or Switzerland, your cookie banner must set the default consent state on Consent Initialization - All Pages, before the Google tag loads. The Google tag reads analytics_storage and the other consent types by itself. If the defaults are set too late, GA4 collects before the visitor has chosen. The full setup is in Consent Mode v2: how to set it up with Google Tag Manager.

Step 4: Add GA4 event tags

The Google tag covers page views and enhanced measurement. For any other action, add an event tag:

  1. Go to Tags → New → Tag Configuration and choose Google Analytics: GA4 Event.
  2. In Measurement ID, enter the same G- ID.
  3. In Event Name, use one of Google’s recommended events where one fits (generate_lead, sign_up, purchase) or your own name in lowercase with underscores (call_click).
  4. Under Event Parameters, add details you want to report on, such as form_name or value.
  5. Under Triggering, choose the trigger for the action: a Form Submission trigger, a Click trigger on the button text, or a Page View trigger on the thank-you page.
  6. Save.

For a worked example of a click event, see how to track every click on your menu items with Tag Manager and GA4. If an event should count as a lead or sale, mark it as a key event in GA4 (key events are what GA4 used to call conversions); GA4 key events vs Google Ads conversions explains what that does and doesn’t do for your ads.

Step 5: Test in Preview mode with Tag Assistant

  1. In Tag Manager, click Preview.
  2. Enter your website address and click Connect. Your site opens in a new window connected to Tag Assistant.
  3. In Tag Assistant, click the first event in the left column (Consent Initialization, then Initialization). Under Tags Fired, your Google tag should appear on Initialization.
  4. Click through the site and trigger your events (submit a test form, click the button). The matching GA4 event tags should appear under Tags Fired on the right event.
  5. If you use a cookie banner, open the Consent tab and check that the defaults and the update after you accept look right.

Preview mode also turns on GA4’s debug mode for your own browser, which is what the next step uses.

Step 6: Check DebugView and Realtime in GA4

  1. In GA4, go to Admin → Data display → DebugView.
  2. With Preview still connected, browse your site. Your device appears, and each event shows in the Seconds stream within a few seconds: page_view, scroll, user_engagement and your own events.
  3. Click an event to see its parameters, and check form_name or value arrived as you set them.
  4. Then open Reports → Realtime, which shows activity from the last 30 minutes for everyone, not only debug devices.

Two things that make people think the install failed when it didn’t:

  • Events don’t show in DebugView if you declined analytics cookies in your own banner, or if an ad blocker or privacy extension blocks Google Analytics. Accept the banner and pause the blocker while you test.
  • Standard reports take time. Realtime and DebugView are immediate; the other reports usually take up to 24–48 hours to fill in.

Step 7: Publish

  1. Click Submit.
  2. Choose Publish and Create Version.
  3. Give the version a name and description that says what changed (“GA4 Google tag + lead event”), so you can find it later.
  4. Click Publish.

The Submit Changes screen in Google Tag Manager with Publish and Create Version selected, a version name and description, and the Publish button highlighted

Nothing reaches real visitors until you publish. If something goes wrong later, Versions lets you publish the previous version again.

What’s changing in Tag Manager in 2026

Google is merging the Google tag and Tag Manager. In 2026 Tag Manager gained a Settings section and an optional container optimization: once you accept it, the container sends data directly to Google products instead of loading an extra gtag.js file, and Google tag settings move to that Settings section. In an optimized container, Google’s help now shows a Google Analytics destination tag in place of the Google tag, fired on an Initialization trigger, with the same Tag ID and the same optional settings.

Nothing changes until someone with publish rights accepts the optimization, and you can preview it first. Existing Google tags and GA4 event tags keep working. If your container shows the optimization banner, preview it, repeat Steps 5 and 6 above, then publish.

Common mistakes I see

  1. Double tagging. GA4 is hard-coded in the theme (or added by a plugin) and also installed in Tag Manager. Page views double, engagement looks suspiciously good, and pages per session jump. In Tag Assistant, the same G- ID shows up twice. Keep GA4 in one place, Tag Manager, and remove the other.
  2. Enhanced measurement duplicates. You build a form submission event in Tag Manager while enhanced measurement’s own form interactions setting is on, so GA4 gets two form events per submission (and the built-in form_submit often fires on forms that didn’t actually send). Turn off the enhanced measurement option you’re replacing (Data streams → your stream → Enhanced measurement → settings icon) and keep your own event.
  3. A GA4 event tag named page_view. The Google tag already sends page views. Sending another one doubles them.
  4. The Google tag on All Pages instead of Initialization - All Pages. Event tags that fire on All Pages can then run before the Google tag has loaded, and lose its settings.
  5. The wrong container. Changes are published in a container that isn’t the one on the site, or the site has two containers and nobody remembers one. Compare the GTM- ID in Tag Assistant with the one at the top of Tag Manager.
  6. Previewed, never published. Everything works in Preview, nobody clicks Publish, and GA4 shows only the developer’s own visits.
  7. Missing consent defaults. A cookie banner shows, but no default consent is set on Consent Initialization, so GA4 and Google Ads get no consent signals for European visitors.
  8. Your own visits in the data. Filter internal and developer traffic in GA4 (Admin → Data collection and modification → Data filters) so testing doesn’t inflate your reports.

FAQ

Is the measurement ID the same as the Tag ID?

For GA4, yes in practice: you paste your GA4 measurement ID (G-...) into the Google tag’s Tag ID field. GA4 event tags still ask for the measurement ID.

What happened to the GA4 Configuration tag?

Google replaced it with the Google tag in Tag Manager in 2023 and upgraded existing GA4 Configuration tags automatically. If your container still has one, it has already been converted; it just may still carry its old name.

Should I use Initialization - All Pages or All Pages for GA4?

Initialization - All Pages for the Google tag, as Google recommends. Use All Pages or more specific triggers for your other tags. Your consent banner goes on Consent Initialization - All Pages.

Why don’t I see data in GA4 after installing the tag?

Check, in order: the container is published, the Google tag fires in Preview, events arrive in DebugView with analytics consent accepted and no ad blocker, and you’re looking at Realtime rather than a standard report, which can take a day or two.

Can I install GA4 without Tag Manager?

Yes, by pasting the Google tag snippet into your site’s code, or through your platform’s Google integration. Tag Manager is the better choice once you need events beyond page views, Google Ads conversions, other ad platforms’ tags or a cookie banner, which is most businesses that advertise.

Need help with GA4 and Tag Manager?

I install GA4 through Tag Manager, set up the events and key events that matter for your business, connect them to Google Ads and test the whole thing with consent accepted and declined. If your GA4 numbers look wrong or you’re not sure what’s installed, ask me for a conversion tracking review.

Daniel Timponi

Digital Marketing Analyst & Consultant · 17+ years crafting digital marketing that converts.

Schedule a call