Levelling Up Your Google Tag Manager/Data Studio Game For Free

The possibilities of what you can do with either Google Tag Manager or Data Studio are near-limitless – making them both pretty daunting prospects to newcomers.

Over the last 18 months, I’ve refined what I use them for, and where the most value lies. With some know-how, you can track a lot with little-to-no development support. But, where do you start?

There are thankfully two features which are here to save you – GTM container imports and sharable Data Studio reports – ways of quickly firing up pre-made setups and reports which mean you don’t have to start from scratch. The time it takes to test & deploy these is far less, therefore the gains are far higher.

There are hundreds of templates for basic reporting out there, but I wanted to show you a few ways you can take your first steps into more advanced ways of looking at key performance methods. What’s more, they are easy to deploy and 100% free.

I’ve split this post up into two parts – GTM Setup and the Data Studio report – both you can make copies of and use today. Whilst I’ll describe these in more detail below, also note that there are some caveats at the bottom to be aware of.

TL;DR

You can download the boilerplate for Google Tag Manager here.

You can find a copy of the Data Studio report here

GTM Components:

Here’s what you will find in the GTM container I’ve built – albeit skipping some really basic things, like Pageview tracking etc – I wanted to give you an idea what’ll be working and why I’ve included it.

This GTM boilerplate is an evolution of one I covered here – it gives you more of an introduction if you want to read more about it.

Scroll Depth Tracking

Scroll Depth Tracking

Scroll depth tracking is a great feature of GTM which I now deploy on every website I work on.

It’s easy to work with & surprisingly effective. A series of events fire at predetermined depths as you scroll down the page – in my example, 0%, 25%, 50%, 75%, and 100%.

It doesn’t get more complex than that – but if you are starting to dig into why an exit rate of a page seems high, you can easily view where people are dropping off without the need of other UX testing software.

Link Click & Document Download Tracking

Click Interactions Datastudio

Bit of a bare-essential for GTM really – again, really easy to set up – but this one is great for tracking some micro conversions that can easily be missed.

So for example, clicks on “tel:” or “mailto:”, perhaps even downloadable files, .pdf, .doc etc. Pushed into GA to report against, even set as a conversion for goal tracking if you so wish. The above screenshot has even more complex ones I’ve set up on previous client accounts – it’s easy to scale up as you need to.

UA Lookup Tables (for testing/staging)

Google Analytics Lookup table GTM

This isn’t going to assist reporting, it’s just something I’ve found really helpful.

For those of you who are working on Live & Staging environments, you can use the hostname to determine which Analytics account ID is displayed on which, e.g. staging-site.com or live-site.com. I know that GTM has its own environments feature, but it takes separate code to be added to each version, which I’ve found to be a bit of a faff.

If you want to do environments the “right way”, you can read more about it here.

JavaScript Error Tracking

JavaScript Errors DataStudio

This is a feature which won’t be essential for all builds, however, it’s another which should be ready for every site… because, why not?

Recording JavaScript errors can be really valuable, especially if you suspect some users’ experience may be impacted by core functionality acting up.

It may take someone with more development experience to make use of these errors (i.e. fix them) – but if you haven’t been recording them, you won’t know what you don’t know.

If you want a more thorough introduction, Tom Bennet from Builtvisible has got you covered.

404 Monitoring

404 Monitoring DataStudioGoogle Analytics Lookup table GTM

Tracking 404s are an often missed opportunity with many analytics accounts. But given that a lot of websites’ 404 pages have “404” or “not found” in the title makes them really easy to identify.

Just to keep things tidy, I’ve set an event to fire when this happens.

This is something you can view without events – just look at pages where the title contains “404” or “page not found” using a filter in Data Studio. There is no real right or wrong answer here, it comes down to personal preference.

Note: this won’t work if:

  1. Your 404 page redirects to www.yourwebsite.com/404/
  2. Some/any of your 404 page templates don’t contain “404” in the title
  3. Your GTM code doesn’t fire on the 404’ing page (for whatever reason)

“UA Passcode”

Do you have an analytics spam problem? This’ll be gold if you do. I love this addition via GTM as it’s invaluable to stop referral/ghost/measurement protocol spam from polluting your data.

I can’t take the credit for this one, you can thank Eoghan, but every universal analytics tag in this container sends a secret key to analytics as a custom dimension.

Really quickly, here are the steps in creating this one if you didn’t make it through Eoghan’s blog.

1) Create the custom Dimension in Google Analytics

GA Password Dimension

2) Create the custom dimension (which, in the boiler plate can be found in the {{MASTER GA SETTINGS}} variable)  the index value needs to relate to what’s in GA – i.e. in this example they’re both “1”Custom Password Dimension GTM

3) On you master view (ensure you always have one view with no filters in case you set this up wrong), you can add a filter which only includes hits which match the password you’ve specified in GTM (above)

Password FIlter in GA

Note: if you only have one view in your account, stop! Filters on views could ruin your data, you need to ensure you always have on unfiltered view in case anything goes wrong. If you’re confused, this blog can help.

Data Studio

This is where we bring everything together – what is the point of creating a whole new selection of events to track if you can’t easily view it? All the screenshots above are from the Data Studio dashboard I’ve created (link again below) and display the information captured by the boilerplate GTM setup – nice and simple.

You simply click here, make a copy of the report & then it’ll ask you to connect the analytics account you want to use.

Caveats

I want as much of these to be as complete as possible, but creating this I thought it’d be best to raise a few pointers:

  1. I do make the assumption you are using GTM for this process, if you’re not, please consider moving across.
  2. If you don’t have admin access to GA you won’t be able to make any amends to Custom Dimensions or View settings – this will stop you setting up the “UA Passcode”.
  3. The GTM boilerplate does not track form submissions, ecommerce transactions or anything else that is mission-critical for most accounts. If you are starting with GTM totally fresh then be aware you’ll still need to worry about these. If you have them tracking using an older tracking code on the site, they won’t work with GTM & may conflict (i.e. double page views or transactions being fired, not good).
  4. For large sites, firing scroll-depth & JavaScript error events may put you above the free 10,000,000 monthly hit limit. This could cause some problems, but won’t impact the vast majority of you.
  5. If you do upload and use the GTM boilerplate, please be careful you don’t write over anything existing and always test before you deploy the changes.

Get Cracking

What are you waiting for? You can pick and chose the elements you want in both the GTM boilerplate and the Data Studio report you can get creative. If you’re new to either of these two products I suggest you test them first – it’s possible to write over current tags in tag manager, which may cause problems.

This is only the starting point, there are probably those who’ve done way more or even implemented this in a slightly different way. But if you have any questions, or get stuck, drop me a message on Twitter or in the comments below.

Chris Green

About Chris Green

Chris Green is Head of Marketing at StrategiQ, a full-service marketing agency based in the East of England.