By the end of this post you'll know how to:
Set Up Google Tag Manager (GTM)
Set Up Google Analytics 4 (GA4)
Install tracking codes for GTM/GA4 on your website
Setup Conversion tracking on PDF downloads, form submissions, phone number or email link clicks
There is a video to walk through it at the end!
Step 1: Set Up Google Analytics 4
If you had Universal Analytics (UA) and still haven't converted, Google likely auto-processed the transition, but you still need to update your code and follow the steps in this post.
The Setup Assistant is helpful if you're ever lost!
To set up a Google Analytics account, just go to https://analytics.google.com, sign in, or create an account. Then you'll be prompted to set up an account, or you can go to settings and click "create new account." Any new account now will default to GA4. UA is discontinued as of July 1, 2023.
Walk through the simple steps and accept the terms, and you'll be ready to go!
Keep this analytics tab open, because you'll need to use this code in a bit.
Step 2: Set Up GTM and Conversion Tracking
The great thing about tag manager is that you can implement these 2 codes, and then you can fire a bunch of other codes out from tag manager, without having to actually edit website code.
Open a new tab and go to https://tagmanager.google.com You should now already be logged in.
Create a new account by clicking the "Create Account" button, and walking through the simple steps.
Once complete, 2 tracking codes will appear. You can use the copy button in the top right when we add them to your website in the next step.
The first thing you should set up to fire on Google Tag Manager is Google Analytics 4, on all pages. All you need is the measurement ID for a GA4 Configuration, and trigger it to fire on all pages.
Then to set up conversions, you'll be able to select that GA4 Configuration you just set up, then you'll just need to name the event how you'd like, and set the trigger.
Before setting them up, make sure you go to the variables tab, and configure all of the click variables.
For a brochure or pdf/download, you can use a link click that includes .pdf.
For a phone number link click, you can use a link click trigger for anything including "tel:"
For an email link click, you can use a link click trigger for anything in cluding "mailto:"
For a form submission, use dev tools/inspect element on a forms submit button to identify a "class" or "id", then you can do a button click trigger.
E-commerce tracking is much more complicated.
Step 3: Install Tag Manager Tracking Code on the Website
On your website, you'll need to install 2 Google Tag Manager Codes. One code in the <head,> one in the <body>.
WordPress: I recommend downloading a plugin like this "Head & Footer Code" to install the Tag Manager code. There are plenty of these, and GA/GTM-specific plugins. Whatever plugin you download-make sure it is regularly updated and has good reviews. When you install the codes with the theme or in the actual code in WordPress, it's possible it could get overwritten. Using a quality plugin will prevent that.
Other Platforms: Sometimes there will be sections under "SEO" "Marketing" or "Analytics" where you can add the code or the Container ID. Worst case in the advanced settings you'll just need to go to the code editor-just be careful! Save a copy before pushing any edits. There are lots of articles out there for platforms like Squarespace, Wix, Shopify and other platforms.
HTML Site: You'll have to just place the codes, directly into the website's HTML code. It's probably in a master file so that it replicates to all pages.
Step 4: Verify Functionality
Test 1: Download the Tag Assistant Legacy (by Google) Toolbar Extension. This will show the tracking codes that are on the site and if they're integrated properly
Test 2: View the source code. Use CTRL-F "tagmanager" "google" or "analytics" to search for the codes
Test 3: Look at real-time data and other traffic data coming in over the next few days
Step 5: Check for events to populate in the GA4 settings-mark conversions
Mark what matters to your business so you can better estimate ROI and get better reporting within GA4. You can also import these conversions into Google Ads.
GA4 Set Up Walk-through Video
Having trouble? Leave a comment or send me a message
I'd be happy to help!
The more you do this, the faster you'll get.
Hopefully, Google doesn't switch things up on us again anytime soon.