How to Connect GA4 with GTM | Step-by-Step Tag Setup Guide

April 10, 2026

Author: Shusaku Yosa
GA4とGTMを連携する方法|タグ設定の手順をステップ解説

When implementing GA4 (Google Analytics 4), using GTM (Google Tag Manager) is the most efficient approach. With GTM, you can manage all your tags centrally without directly editing HTML, making it easy to modify settings and add events.

This article provides a step-by-step guide to connecting GA4 and GTM. Whether you're setting up GA4 for the first time or are unfamiliar with GTM, this guide covers everything from creating a Google Tag to configuring custom events and verifying your setup.

Understanding the Roles of GA4 and GTM

Both GA4 and GTM are free tools provided by Google, but they serve entirely different purposes. GA4 is an analytics tool for understanding user behavior on websites and apps. GTM, on the other hand, is a tag management tool for deploying and controlling various tracking tags.

In short, you configure tracking in GTM and review the results in GA4. Combining both tools enables you to build a flexible and efficient measurement environment.

4 Benefits of Setting Up GA4 with GTM

Centralized Tag Management

Without GTM, you need to embed tags directly into the HTML of each page you want to track. With GTM, you only need to install the GTM code across your site once during initial setup. After that, all tag additions and changes are managed entirely within the GTM dashboard.

No Coding Knowledge Required

GTM comes with pre-built tag templates for GA4. Simply fill in the required fields to complete the setup, allowing marketing teams to manage tracking configurations without relying on developers.

Version Control for Peace of Mind

GTM saves settings by version. If a tag configuration goes wrong, you can instantly revert to a previous version, minimizing operational risk.

Safe External Sharing

When outsourcing tag setup to agencies or vendors, GTM allows you to share only the tag management interface. There's no need to hand over CMS login credentials, making it much more secure.

Prerequisites: GA4 Property and GTM Container

Before starting the integration, make sure these two items are in place. First, create a GA4 property by logging into Google Analytics and setting up a web data stream. Second, create a GTM account and container from the GTM website using your site's domain name. Paste the issued GTM code into the head and body sections of every page on your site.

Connecting GA4 and GTM in 5 Steps

Step 1: Find Your GA4 Measurement ID

Log into the GA4 admin panel and navigate to Admin > Data Streams, then select your web stream. Copy the Measurement ID (in the format G-XXXXXX). You'll enter this ID in your GTM tag.

Step 2: Create a Google Tag in GTM

Open the GTM dashboard, go to Workspace > Tags > New. Click the tag configuration area and select "Google Tag" from the tag types. This was previously called "GA4 Configuration Tag" but has been renamed to "Google Tag." Paste the Measurement ID from Step 1 into the Tag ID field.

Step 3: Set Up the Trigger

Click the Trigger area at the bottom of the tag configuration screen and select "All Pages." This ensures the GA4 tag fires on every page of your site. If you want to limit tracking to specific pages, create a custom trigger. Click Save when done.

Step 4: Verify with Preview Mode

Click the Preview button in the top right of the GTM screen and enter your site URL. Your site will open in a new tab, and Tag Assistant will show a successful connection. If your Google Tag appears under "Tags Fired," the tag is working correctly. If it appears under "Not Fired," review your configuration for errors.

Step 5: Publish and Verify in GA4

If preview looks good, click the Publish button in the top right. Without publishing, tracking won't start in your production environment. After publishing, visit your site, then open GA4's Reports > Realtime view. If active users appear within the past 30 minutes, the integration is complete.

How to Set Up Custom Events

GA4 automatically collects basic events like page views and scrolls. To track specific user actions such as button clicks, form submissions, or file downloads, add a GA4 Event tag in GTM.

Go to Tags > New in GTM, select "Google Analytics: GA4 Event" as the tag type, and enter your Measurement ID and event name. Then create a trigger specifying the conditions you want to track (e.g., when a specific button is clicked). Verify the tag fires in preview mode, then publish.

GA4 Event Types

GA4 events fall into four categories. Automatically collected events are tracked just by installing the Google Tag. Enhanced measurement events like scrolls and outbound clicks can be toggled on/off in the GA4 settings. Recommended events use Google-suggested names and parameters. Custom events are freely defined based on your business needs. Use GTM's GA4 Event tag for recommended and custom events.

Common Troubleshooting

Data Not Showing in GA4

The most common cause is forgetting to click Publish in GTM. Preview mode alone doesn't deploy to production. Also check for typos in your Measurement ID. It may take a few minutes for data to appear in GA4's Realtime report, so wait and recheck.

Duplicate Tracking

If you have gtag.js embedded directly in your HTML while also deploying a Google Tag via GTM, data will be counted twice. When managing tags through GTM, remove any GA4 tag code hardcoded in your HTML.

Preview Mode Won't Connect

Browser extensions or popup blockers can prevent the connection. Try using Chrome's incognito mode or temporarily disable your extensions.

Conclusion

Connecting GA4 and GTM is an essential foundation for any website's measurement setup. GTM enables centralized tag management, no-code configuration, and safe version-controlled operations.

The process involves five steps: confirm your GA4 Measurement ID, create a Google Tag in GTM, set the trigger to All Pages, verify in preview mode, then publish. Custom events follow the same pattern using GA4 Event tags. Start with the basic Google Tag setup, then add event tracking as needed.

Related posts