How to set up GA4 with GTM on Google Analytics

intermediate 8 min read Updated 2026-03-18
Quick Answer

Set up GA4 with GTM by creating a GA4 property, obtaining the Measurement ID, then configuring a Google Analytics: GA4 Configuration tag in GTM with proper triggers. This allows centralized tag management while maintaining accurate GA4 tracking.

Prerequisites

  • Active Google Analytics account
  • Google Tag Manager account
  • Website admin access
  • Basic understanding of tracking codes

Step-by-Step Instructions

1

Create GA4 Property in Google Analytics

Navigate to Google Analytics and click Admin in the bottom left. Under the Property column, click Create Property. Select GA4 as your property type, enter your website details, and complete the setup wizard. Copy your Measurement ID (starts with G-) from the Data Streams section.
Keep your Measurement ID handy as you'll need it for GTM configuration
2

Access Google Tag Manager

Go to Google Tag Manager and select your website container. If you don't have a container, click Create Account and follow the setup process. Make sure GTM is properly installed on your website by checking that the container snippet is in your site's <head> section.
Use GTM's Preview mode to test tags before publishing
3

Create GA4 Configuration Tag

In GTM, click Tags then New. Choose Google Analytics: GA4 Configuration as your tag type. In the Measurement ID field, paste your GA4 Measurement ID from step 1. Name your tag something descriptive like GA4 Config - All Pages.
Enable 'Send to server container' if you're using server-side GTM
4

Configure Page View Trigger

Click Triggering in your GA4 Configuration tag. Select All Pages trigger to fire the tag on every page load. If you need custom triggering, create a new trigger by clicking + and selecting Page View with your specific conditions.
5

Set Up Enhanced Measurement (Optional)

Back in Google Analytics, go to Admin > Data Streams and click your web stream. Toggle on Enhanced measurement to automatically track scrolls, outbound clicks, site search, video engagement, and file downloads without additional GTM configuration.
Enhanced measurement reduces the need for custom event tags in GTM
6

Test Your Configuration

In GTM, click Preview to enter debug mode. Visit your website and verify that the GA4 Configuration tag fires on page loads. Check the DebugView in Google Analytics (under Configure > DebugView) to see real-time events from your test traffic.
Install Google Analytics Debugger browser extension for additional debugging information
7

Publish Your Container

Once testing is successful, return to GTM and click Submit. Add a descriptive version name like GA4 Setup - Initial Configuration and publish your changes. Your GA4 tracking will now be live through GTM.
Always create a descriptive version name and notes for future reference
8

Verify Data Collection

Wait 24-48 hours, then check your GA4 property for incoming data. Go to Reports > Realtime to see immediate traffic, and Reports > Engagement > Pages and screens to verify page view tracking. Set up conversion events and audiences as needed for your business goals.
Data may take up to 24 hours to appear in standard GA4 reports

Common Issues & Troubleshooting

GA4 tag not firing in GTM Preview

Check that your trigger is set to All Pages and verify the Measurement ID is correct. Clear browser cache and ensure GTM container code is properly installed on your website.

No data appearing in GA4 reports

Verify your Measurement ID matches exactly between GTM and GA4. Check that your GTM container is published, not just previewed. Data can take 24-48 hours to appear in standard reports.

Duplicate page views being tracked

Ensure you've removed any hardcoded GA4 tracking code from your website when using GTM. Check that you only have one GA4 Configuration tag firing on the same trigger.

Enhanced measurement events not working

Verify Enhanced measurement is enabled in your GA4 Data Stream settings. Some events require specific HTML structures (like video tags for video tracking). Check DebugView to see which events are firing.

Prices mentioned in this guide are pulled from current plan data and may change. Always verify on the official Google Analytics website before purchasing.