User analytics and data are important in deciding your website’s content and marketing strategy. Google Analytics is the best and most trusted source for this. So, if you pair your Google Analytics with Google Tag Manager, you can streamline the implementation process and manage other marketing tags from a central dashboard. Today, we’ll discuss how to install Google Analytics with Google Tag Manager.
What is Google Tag Manager?
As the name suggests, Google Tag Manager is a tag management system using which you can add and update different tracking codes such as Google Analytics or Facebook Pixel. Another great thing about GTM is that you don’t need to update the website code directly to activate this feature. GTM simplifies the complete tracking process, which allows webmasters and marketers to track user behaviour and website performance.
Why Use Google Tag Manager for Google Analytics?
Now that you have understood what Google Tag Manager is, it’s time to understand why you should use it.
- Centralized Tag Management: You can simultaneously manage multiple website tags or pixels in Google Tag Manager.
- No Code Interference: Another great feature is that once it is set up, you won’t need to alter your website’s code when you want to add or update a particular tracking tag.
- Trigger Control: GTM also provides trigger control, which you can use to decide where and when the tags fire on specific pages.
- Event Tracking: GTM also provides Customisation for event tracking. You can easily set up event tracking for actions like form submissions or button clicks.
Step-by-Step Guide – How To Install Google Analytics With Google Tag Manager
Step 1: Set Up Google Tag Manager
- Visit the Google Tag Manager website and click on Create Account.
- Enter your account name and website URL and select your container type, web or mobile.
- Copy the GTM container code and paste it into the header section of your website.
Step 2: Create a Google Analytics Account
- Sign in to your Google Analytics account or set up a new account if you don’t have one.
- In the GA dashboard, navigate to Admin and select Data Streams. From there, go to the web section and select your website.
- Find your Measurement ID, which begins with G- for GA4 or UA-XXXXXXXX-X for Universal Analytics (UA). Copy the Measurement ID.
Step 3: Create a Tag in Google Tag Manager
Log into Google Tag Manager and navigate to your container. Click on Tags in the left menu and then New. Name your tag something like Google Analytics Tracking.
Step 4: Configure Your Google Analytics Tag
- For Universal Analytics (UA):
- In the tag set-up, type tag configuration and select Google Analytics: Universal Analytics. Set the track type to page view.
- Click on New Variable in the Google Analytics settings to enter your UA Tracking ID.
- For Google Analytics 4 (GA4):
- In the tag set-up, type tag configuration and select Google Analytics: GA4 Configuration. Enter your Measurement ID, which starts with G-.
Step 5: Set Up Triggers
After configuring the tags, click on the Triggering section. Select All Pages as the trigger. This ensures the tag will fire on every page of your site. Click Save once you’re done.
Step 6: Preview and Publish the Tag
- Click the Preview button in the top-right corner to test the tag before publishing it. A new window will open, and you can check if the tag is firing correctly by navigating your site.
- Once tested, return to GTM, click Submit, and then Publish to make your tag live.
Step 7: Verify Tracking in Google Analytics
Once your tags are live, go to your Google Analytics account and check the Real-Time reports. You should see users and their interactions with the website.
Additional Event Tracking Setup
If you want to track more than one event, GTM provides the option. You can set up event tracking for user actions such as button clicks, video plays, or form submissions. Below are the steps:
- Create a new tag in GTM for each action you want to track. Select Google Analytics: GA4 Event.
- Define the event name and parameters. Set the trigger based on user actions such as clicks, scroll depth, etc.
- Test and publish the event tag in GTM.
Combining Google Analytics and Google Tag Manager simplifies your tracking process and provides comprehensive real-time data. Furthermore, it can add and manage multiple tags as needed.
We hope that using this guide, you can easily set up both GA4 and Universal Analytics using Google Tag Manager. By leveraging this power you can gain in-depth insights into your website’s performance, track user behaviour, and make informed decisions to improve your website’s performance.
Frequently Asked Questions Related To Google Analytics and GTM
What is the difference between GA4 and Universal Analytics?
Can I use GA4 without Google Tag Manager?
Do I need to remove the previous Google Analytics code before using Google Tag Manager?
Can I track custom events like button clicks with GTM?
Absolutely. GTM allows you to customise event tracking without modifying your website’s code. You can define click triggers, form submissions, video interactions, etc.
What is Enhanced Measurement in GA4?
Enhanced Measurement in GA4 enables automatic tracking for events like scrolls, outbound clicks, file downloads, and video views without additional code.