Install Google Analytics 4 with Google Tag Manager

Install Google Analytics 4 with Google Tag Manager: Google Analytics 4 (GA4) is an essential tool for tracking user behaviour on your website. When used with Google Tag Manager (GTM), you can implement tracking without touching the website’s code. This chapter guides you through setting up GA4 using GTM, from creating a property to publishing and reviewing your data in real time.




Create a Google Analytics 4 Property & Data Stream

Before you begin, you must create a Google Analytics 4 property and connect it to a data stream. The data stream is the source from which GA4 will collect data, such as your website or app.

1) Log into your Google Analytics account.
2) Click on the Admin icon in the bottom left.
3) Under the Property section, click Create Property.
4) Fill in the required information (Property Name, Reporting Time Zone, and Currency), then hit Next.
5) Choose Web as your data stream type.
6) Enter your website's URL, name your stream, and then click Create Stream.

The system will generate a Measurement ID (starts with "G-"), which will be essential for tracking data.

Install Google Analytics 4 with Google Tag Manager

Now that you’ve created your GA4 property, it’s time to install it using Google Tag Manager.

1) Head over to Google Tag Manager and open your container.
2) In GTM, click on Tags in the left panel and then New.
3) Name your tag something like "GA4 - Pageview Tag."
4) Select Tag Configuration and choose Google Analytics: GA4 Configuration.
5) Paste your Measurement ID from GA4 into the relevant field.
6) Set the tag to fire on All Pages by selecting the appropriate trigger.
7) Save your tag.

DebugView in Google Analytics 4

Before publishing, it's crucial to test and ensure everything is functioning correctly. The DebugView in GA4 allows you to see live data from users interacting with your site.

1) In Google Tag Manager, click Preview to enter Preview Mode.
2) Open your website in a new tab to trigger page views.
3) In GA4, navigate to Admin > DebugView under the Property settings.
4) You should see your real-time data appearing in DebugView, including page views, scrolls, and other interactions.

This testing phase ensures that the tag fires correctly and data is being collected as intended.

Publish Your Changes in Google Tag Manager

After successful testing, the final step is to publish the changes in Google Tag Manager.

1) In GTM, after exiting Preview mode, click the Submit button at the top right.
2) Name your version, add a description (e.g., "Added GA4 tracking"), and click Publish.

Publishing ensures that GA4 is now tracking all users on your site, and the data will start appearing in the GA4 interface.

Google Analytics 4 Realtime Reports

Once GA4 is installed and tracking, you can immediately start viewing real-time data.

1) Go to Realtime in the left-hand menu of GA4.
2) Here, you’ll see live data of users currently on your site, including their location, pages visited, traffic source, and more.

The Realtime report is particularly useful for verifying that your setup is working correctly and that your users' behaviour is being captured in real time.


Install Google Analytics 4 with Google Tag Manager

Privacy Policy || Term and Conditions
Copyright © 2024. Designed by Sandeep Reddy.
WhatsApp