On this page
To set up Google Analytics 4 with Google Tag Manager, create a GA4 property and web data stream, then add a Google Analytics tag in GTM with your tag ID, firing on the Initialization – All Initialization Events trigger. Add GA4 event tags for leads and purchases, mark them as key events, and check everything in Tag Assistant and DebugView before you publish.
What’s the Difference Between the Google Tag and a GA4 Event Tag in GTM?
The base tag loads GA4 and sends page views; event tags send specific actions on top of it. You need one base tag and as many event tags as you have actions worth tracking.
| Tag in GTM | What it does | Typical trigger |
| Google Analytics (or Google tag) with your tag ID | Loads GA4, sends page views and enhanced measurement | Initialization – All Initialization Events |
| GA4 Event tag | Sends one named event, with parameters | A custom event, page view or click |
If you set GA4 up a few years ago, you may remember a separate “configuration” tag. Google’s current Tag Manager help sets GA4 up with a Google Analytics tag (listed under Tag Configuration > Google Analytics) or the Google tag instead, both holding your tag ID. Shared parameters, such as currency, can live in an Event Settings variable so you don’t retype them on every event tag.
What Do You Need Before You Start?
You need edit access to GA4 and publish access to GTM, plus a short list of the actions that matter to the business.
- A Google Analytics account with Editor access (Marketer or higher to create key events).
- GTM installed on every page, with publish access.
- A list of 3 to 6 actions to track, such as quote forms, bookings, calls, sign-ups and purchases.
- For forms without a thank-you page: a dataLayer event pushed on success.
- A list of any existing GA4 installs: plugins, theme settings or hard-coded snippets.
- Your consent banner settings, if you use one, so you know when GA4 is allowed to set cookies.
New to GTM itself? Start with our Google Tag Manager setup guide, then come back.
FREE TRACKING AUDIT
Find Out Which Conversions You Are Missing
JuvioX reviews your GA4, Tag Manager and ad platform tracking, then sends a prioritized list of what to fix first. Free, with no obligation.
How Do You Set Up GA4 With Google Tag Manager Step by Step?
Create the data stream, review enhanced measurement, add the base tag, clear out old installs, add event tags, mark key events, then test and publish.
Step 1: Create a GA4 Property and Web Data Stream
In Google Analytics, create a property for the business with the right time zone and currency, then add a Web data stream for your domain. The stream shows the ID you’ll paste into GTM. It looks like this:
G-XXXXXXXStep 2: Review Enhanced Measurement
In Admin, under Data collection and modification, open Data streams and click your stream. Enhanced measurement can collect scrolls, outbound clicks, site search, YouTube video engagement, file downloads and form interactions without extra tags. Page views are always on. Leave the rest on for now; you’ll decide what to switch off once you know which events you’ll build in GTM.
Step 3: Add the Google Analytics Tag in GTM
In GTM, go to Tags > New, click Tag Configuration, choose Google Analytics, and enter your tag ID. Under Triggering, choose Initialization – All Initialization Events, the trigger Google’s help uses for this tag. Name it clearly, for example “GA4 – Base – Tag”, and save.
Step 4: Remove Every Other GA4 Install
Search the site for other copies of the same ID: a WordPress analytics plugin, a theme or page-builder setting, a Shopify integration, or a snippet pasted into the header. Keep exactly one install, the one in GTM. Two installs are a common cause of doubled page views.
Step 5: Add GA4 Event Tags for Leads and Sales
For each action, add a tag of type Google Analytics: GA4 Event, enter your measurement ID, and set the event name. Where Google has a recommended name, use it (generate_lead, sign_up, purchase), because reports and features understand those names. For a form without a thank-you page, have the form push an event on success:
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'generate_lead',
form_name: 'consultation_request',
lead_source_page: 'pricing'
});Then fire the GA4 Event tag on a Custom Event trigger called generate_lead and pass form_name and lead_source_page as event parameters. Name it the same way, such as “GA4 – Generate Lead – Tag”, with one tag per event so each is easy to find and test. For clicks, menus and forms in more depth, see our GTM event tracking guide.
Step 6: Mark the Events That Matter as Key Events
In GA4, go to Admin > Data display > Events and click the star next to each event that represents a business result. You can create a key event before the event arrives, and GA4 will treat it as one from the first hit. Google lets standard properties mark up to 30 key events, and purchase is marked by default. Keep the list short: leads, bookings, sign-ups and purchases, not scrolls.
Step 7: Test, Then Publish
In GTM, click Preview to open Tag Assistant and connect to your site. Browse two or three pages, then complete each tracked action. In GA4, open Admin > Data display > DebugView and watch the events arrive with their parameters. When everything appears once and in the right place, click Submit > Publish and Create Version, with a version name that says what changed.
Should You Keep Enhanced Measurement On If You Track Clicks in GTM?
Yes, but switch off any individual event you rebuild yourself. Running both versions sends two events for one action.
The usual clash is forms. Enhanced measurement’s form_start and form_submit fire on many forms, including newsletter boxes and failed submissions, while your GTM generate_lead fires only on success. If you track forms in GTM, turn off form interactions in the stream settings and keep your own event. The same applies to outbound clicks and file downloads if you’ve built custom versions. Page views can’t be turned off, which is fine; GA4 should own them.
How Do You Get Custom Event Parameters Into GA4 Reports?
Send the parameter on the event tag, then register it in GA4 as a custom dimension; until you do, it won’t show in standard reports.
- Add the parameter to the GA4 Event tag (for example, form_name).
- Publish, and confirm it appears on the event in DebugView.
- In GA4 Admin, open Custom definitions and create an event-scoped custom dimension with the exact parameter name.
- Wait. Google says you can report on new custom dimensions after 24 to 48 hours.
Standard properties allow 50 event-scoped custom dimensions, so register only what you’ll actually use in reports.
How Do You Track Page Views on Single-Page Apps Without Duplicates?
Pick one method: let GA4 detect page changes from browser history, or send your own page_view events, but not both.
React, Next.js and similar sites change the URL without a full page load. Google’s enhanced measurement help explains that page views are also sent when the site changes browser history state, and an advanced setting under page views controls this. If that setting is on and your developer also pushes a virtual page view to GTM, each route change counts twice. Most sites are fine with history-based detection; switch to your own page views only if you need extra page details on every view.
How Do You Install GA4 Without Breaking Google Ads Tracking?
Add the GA4 tags alongside your Google Ads tags; don’t replace them. They’re separate tags with separate jobs.
- Leave the Google Ads conversion tags and the Conversion Linker or Google tag that store ad clicks untouched.
- If you later import GA4 key events into Google Ads, don’t make an imported purchase and a Google Ads purchase tag both Primary.
- Test a Google Ads conversion in Preview after publishing GA4, to confirm nothing changed.
Our Google Ads conversion tracking setup guide explains when to use native Ads tags and when to import from GA4.
How Do You Check GA4 Data Before Spending on Ads?
Run a short quality check in DebugView and Realtime, compare GA4 key events against your own records for a week, and fix the gaps before any budget relies on the numbers.
| Problem | Likely cause | Fix |
| DebugView is empty | Debug mode off, or analytics consent denied | Use Preview, accept on the banner |
| Every page view counts twice | Plugin or snippet plus GTM | Keep only the GTM install |
| Two form events per submit | Enhanced form events plus GTM event | Turn off form interactions |
| Parameter missing in reports | Not registered as a custom dimension | Create it; wait 24–48 hours |
| Key event not in reports | Recently marked | Allow up to 24 hours |
| Leads in GA4 far below CRM | Trigger on wrong signal, or consent declines | Fire on the success event; review consent |
If a key event stops recording later, our guide to GA4 not tracking conversions walks through the causes in order, and the GA4 audit checklist covers a full review. If you use a cookie banner, our Consent Mode v2 setup guide explains how consent affects what GA4 collects.
What Should Different Businesses Track in GA4?
Start with the actions that bring revenue, then add a few that explain how people get there.
- Dental or medical practice: Key events for online booking completed and call-button taps; a parameter for the treatment page the booking started on.
- Online store: The full ecommerce set (view_item, add_to_cart, begin_checkout, purchase) from a proper dataLayer. See our guides for WooCommerce and Shopify.
- Software company on a single-page app: History-based page views, sign_up and a trial-start event as key events, and a plan parameter registered as a custom dimension.
If you’d like the setup checked before you rely on it, our tracking and analytics team reviews GA4 and GTM as part of a free audit. Ongoing work runs on a flat monthly fee, month to month, with no lock-in.
FREE TRACKING AUDIT
Find Out Which Conversions You Are Missing
JuvioX reviews your GA4, Tag Manager and ad platform tracking, then sends a prioritized list of what to fix first. Free, with no obligation.
FAQ
Frequently asked questions
Why is GA4 DebugView empty even though GTM shows the tag fired?
DebugView only shows traffic with debug mode on, so open your site through GTM Preview or Tag Assistant rather than a normal tab. Google also notes that DebugView stays empty when consent mode is in place and analytics cookies weren't accepted, so accept on your banner during the test. If it's still empty, check that the tag ID in GTM matches your web data stream.
Why does the Realtime report show zero users after I published?
Usually the container wasn't actually published, the tag ID points to a different property, or the visitor declined analytics cookies. Check the latest container version is live, confirm the ID on the data stream, and test again after accepting the banner. Ad blockers on your own browser can also hide your visit.
Why am I getting duplicate page views after installing GA4 through GTM?
GA4 is almost always loaded twice, once by GTM and once by a plugin, theme setting or hard-coded snippet. On single-page sites, it can also come from history-based page views plus a manual virtual page view. Keep one source for each.
Should I remove my WordPress GA4 plugin if I use Google Tag Manager?
Yes, if the plugin also sends GA4 data with the same ID. Keep the plugin only if it does something GTM needs, such as building an ecommerce dataLayer, and switch off its own GA4 tracking in its settings.
Why don't GA4 purchase revenue and my Shopify or WooCommerce sales match?
GA4 only records orders from visitors whose browsers ran the tag and, where a banner is used, allowed it. Ad blockers, consent declines, orders created by staff, refunds and orders that skip the confirmation page all widen the gap. Compare order counts first, then check the purchase event fires once per order with the right value.
How long does a new key event take to show in GA4?
Realtime reports show it within a few minutes of the event happening. Google says standard reports can take up to 24 hours, and marking an event as a key event only applies from that point forward, not to past data.
6 sources & references
- Tag Manager Help Set up Google Analytics in Tag Manager support.google.com
- Tag Manager Help Set up Google Analytics events in Tag Manager support.google.com
- Analytics Help Enhanced measurement events support.google.com
- Analytics Help Mark events as key events support.google.com
- Analytics Help Monitor events in DebugView support.google.com
- Analytics Help About custom dimensions and metrics support.google.com
Official pages we checked when writing this article.






