October 1, 2024

5 Things You Didn’t Know You Could Do with GTM

Google Tag Manager is one of the most useful tools for SEO, allowing us to track custom events that aren’t visible in GA4 by default. However, GTM is a very versatile tool that can be used to achieve much more than this. So, what are the things you didn’t know you could do with Google Tag Manager?

Our 5 things that you didn’t know that you could do with Google Tag Manager are:

Read on to find out more about the 5 things that you didn’t know you could do with Google Tag Manager, how to set them up, and why they’re so useful!

Scroll Depth Tracking

With Google Tag Manager, you can implement tags to track when a user reaches a certain part of the page, whether that’s a certain percentage or the number of pixels scrolled.

Setting this up is easy, simply create a new tag for a GA4 Event, assign your Measurement ID, give the event a name like “scroll_depth_50”, and move on to creating a new trigger.

On Trigger Configuration, scroll down to the User Engagement section and select Scroll Depth. From here, you can choose to measure either Vertical Scroll Depth or Horizontal Scroll Depth and select either Percentages or Pixels.

Percentages are great for getting a general idea across the whole site, whereas pixels can be the better choice for tracking whether users reached an important section of a specific page.

Inject HTML or CSS

As SEOs, we often need to make small changes to a specific page. Most of the time this can be achieved through the text editor on WordPress, but on some custom themes and other site builders, there’s often no option for this.

 This can be frustrating to have to send to the developer to code into the site directly, just for the sake of one page.

Luckily, GTM is here to save us again! By adding a Custom HTML tag, you can inject lines of code into the head of the site quickly and efficiently. 

Custom HTML Example

On one of our client’s recent blogs, we came across an issue on mobile where the table wasn’t conforming to the viewport and it would end up off-screen – allowing users to scroll the entire page horizontally to see it.

Unfortunately, this particular client has a custom-built (not by us!) backend that doesn’t offer much functionality and we don’t have access to the site’s CSS files. 

To get around this, we created a simple Custom HTML tag to edit the scroll effect of the .table-container class that was already on the table element.

<style>

  .table-container {

     overflow-x: scroll; 

   }

</style>

This gives the table a scroll bar and fixes it to the size of the viewport, allowing users to still scroll the table but not the whole page!

Custom JavaScript Variables

Similarly to Custom HTML, Custom JavaScript variables allow you to inject JavaScript code into GTM to perform a wide variety of tasks. This can help you:

By doing this, you’re creating a function that returns a value that you can use in your tags and triggers. Examples of specific tasks that this can achieve include:

Track Page Load Times

You can use GTM to track and monitor the page load times of your site. This was already a standard function of Universal Analytics, but this was scrapped with the move to GA4. Luckily, there’s an easy way to add this back in.

While pagespeed.web.dev will always be the gold standard for checking your site’s performance, it can be difficult to track and monitor this without completing it manually.

With a simple script, you can monitor the page load times directly from GTM. With this, you’re able to compare speeds easily and can see if a particular page performs worse than others. You can also monitor the speed of pages after completing large edits to ensure that your changes haven’t had a negative impact.

How To Track Page Speed in GA4

Step 1.

Create a custom variable in Google Tag Manager. Select the “Custom JavaScript” option and insert the script below. Finally, set the “Format Value” to 0 and save the variable. Just make sure you name it something you won’t forget! We’ll use “Page Load Speed” as our example moving forward.

function() {

if (window.performance && window.performance.getEntriesByType) {

var entries = window.performance.getEntriesByType(“navigation”);

if (entries.length > 0) {

var navTiming = entries[0];

var pageLoadTime = navTiming.loadEventEnd – navTiming.startTime;

return Math.round(((pageLoadTime / 1000) + Number.EPSILON) * 100) / 100;

}

}

}

Step 2.

Next, you’ll need to create two triggers using the “Windows Loaded” built-in option.

For the first trigger, choose “All windows loaded events”. For the second, choose “Some windows loaded events” and fire the trigger when the Page Load Speed is Less Than 0.

Step 3.

Now you can create your GA4 event tag. Set the Event Name to “page_load_speed” and add an event parameter. Name it something like loading_time and attach your JavaScript variable. 

Then add the triggers that you created, with the second trigger being the exception.

Step 4.

At this point, GTM is tracking the loading time of your site and sending it through to GA4. But GA4 isn’t set up to receive it yet.

To set this up, we’ll need to go to Settings > Custom Definitions > Custom Metrics > Create Custom Metric. Enter a name for your metric, we use “Page Load Time”, and copy the parameter name from your GTM tag into the “Event parameter” field. Set the “Unit of measurement” to seconds and you’re ready to add it to your reports!

To learn how to complete a more in-depth page speed audit, read our guide on How to Audit Your Site Speed & Performance.

Event Value Calculations

With service sites, it can often be hard to show the client your SEO success – as there’s no direct monetary value like there is with an e-commerce site. One way to get around this is to track the estimated value of the leads that you earn.

This can be done by taking the client’s average revenue per conversion and dividing it by the average conversion rate of their leads to get their Expected Value Per Contact. Ideally, you would get the conversion rate of each type of lead, be it contact form submissions, email clicks, or phone calls.

*For some clients, you may need to factor in average lifetime value too.

How To Implement Estimated Values in GTM

Step 1.

For our example, we’ll say that the contact form on our site has an Expected Value Per Contact of £100. To start, we’ll need to make the site send a new data layer variable. This may sound complicated, but it’s actually some simple code that you can implement in GTM.

Because the GTM tag is implemented in the head of your site, you can add a JavaScript function here that pushes a revenueValue variable alongside the contact_form event. Here’s how that looks:

<script>

  window.dataLayer = window.dataLayer || [];

  function submitContactForm() {

      window.dataLayer.push({

          ‘event’: ‘contact_form’,  //Change to whatever your contact form submission event is called

          ‘revenueValue’: 100

      });

  }

</script>

Step 2.

Now you need to create a similar variable in GTM, doing the calculation of “ average conversion rate” * “average revenue per conversion”. Here’s how that looks:

function() {

    return 500 * 0.20; // $500 * 20%

}

Step 4.

Now you’ll need to set up the event tag. Set this up as you usually would for your contact form event and set up the trigger and test until you know that it works. From here, you just need to add your variable to the Event Parameters section and save your work.

Step 5.

To see this information in GA4, you’ll need to set it up as a custom metric again, go to Settings > Custom Definitions > Custom Metrics > Create Custom Metric. Enter a name for your metric, we use “Page Load Time”, and copy the parameter name from your GTM tag into the “Event parameter” field. Finally, set the unit of measurement to Currency.

Google Tag Manager Experts

Here at Wildcat Digital, we’re experts in setting up detailed reports that are tailored to our client’s specific needs. If you need Google Tag Manager consultation or would like to enquire about our services, get in touch with a member of our team.

Post by

Jamie Stowe

SEO Account Manager

Will Hitchmough

Founder

Our founder, Will Hitchmough, worked at a number of high profile Sheffield Digital Agencies before founding Wildcat Digital in 2018. He brings an extensive knowledge of all things related to SEO, PPC and Paid Social, as well as an expert knowledge of digital strategy.

Digital Marketing can be a minefield for many businesses, with many agencies ready to take your money without knowing how to deliver results. I founded Wildcat Digital to deliver digital success to businesses with smaller budgets in a transparent way.

Chloe Robinson

Content Strategist Team Lead

With a degree in Marketing and a background in more traditional, offline marketing, Chloe joined Wildcat in 2021 after deciding to move into the digital marketing industry. She joined us as a Content Specialist and quickly moved up the ranks, becoming a Content Strategist and later an SEO Team Leader.

Outside of work, Chloe is an avid creative. If she’s not knitting, you’ll likely find her behind a sewing machine or in the kitchen trying (and often failing!) to make sourdough.

Paul Pennington

SEO Account Director

Paul has a strong background in SEO, having previously founded and ran a successful eCommerce business, as well as running a personal blog that achieves an average of 17K users per month. Paul’s knowledge of SEO is extensive, with a strong emphasis on client handling and technical SEO.

Outside of work, Paul enjoys spending time with his family and staying active with weight lifting and combat sports.

Nadea van der Merwe

Head of Operations

Nadea joined Wildcat in 2021 and has since overhauled the way we work. She has a background in various administrative, operations and HR roles, which gave her the experience and skills needed to lead and organise a growing business. 

Outside of work, Nadea loves anything that keeps her active, but she especially enjoys hiking, camping and mountain biking.

Molly Sturgeon

SEO Account Manager

With a background in sales, Molly is a natural Account Manager, brilliantly handling any issues that come her way. Having joined us as a Digital Marketing Executive, and working part-time through her final year of University, Molly is a shining example of how hard work pays off. She is now an SEO Account Manager with a particular interest in Content and Client Management. 

In her spare time, Molly loves to get out in nature, hiking and exploring the Peak District. She also loves cooking and likes to unwind with a bit of yoga.

Libby Oldale

Senior PPC Account Manager

Libby joined Wildcat in 2021 as our first PPC hire. With a degree in Digital Media Production, a Master’s in Digital Media Management and previous experience in Social Media Management, Libby hit the ground running and has since climbed the ranks to Senior PPC Account Manager and has a particular interest in the eCommerce sector.

Outside of work, Libby likes gaming, and cooking and likes to keep active by lifting weights.

Jasmine Savery

SEO Account Manager

Jasmine joined Wildcat in 2022 with a strong background in SEO and Account Management. At the time, she was finishing up a Level 4 Apprenticeship in Digital Marketing from the Chartered Institute of Marketing, and has since worked her way up to SEO Account Manager. Jasmine excels at content writing and promotion, and particularly enjoys finding creative ways to join the dots on multi-channel campaigns.

In her spare time, Jasmine volunteers at a charity, helping combat loneliness & social isolation experienced by older neighbours. Outside of Wildcat, she owns a catering company, Savery Grazing, creating delicious grazing tables & platters for a range of events. She also loves skiing and exploring the Peak District.

Braden Godley

Senior PPC Executive

Prior to joining Wildcat, Braden founded and ran his own Social Media Management agency where he gained valuable skills in growing brands’ online presence, which has since proven invaluable in his role at Wildcat. 

Outside of work, Braden is a big football fan, regularly travelling to Pride Park to support Derby County. He also enjoys watching and playing snooker, hiking in the Peak District, and attending air and car shows.

Jon Herdman

Senior SEO Executive

After spending ten years managing businesses, restaurants, cafes and event spaces across Sheffield, Jon decided to change careers and joined Wildcat as an SEO Executive in 2022. He especially enjoys the client management side of the job, helping them to understand digital marketing and ways in which they can build their business’s presence online. 

Outside of work, Jon likes to keep fit with running, badminton and football, and also loves music. 

Rachel Davies

SEO Executive

Rachel joined us as a graduate, having recently graduated from Sheffield University with a degree in English Literature. Since joining, Rachel has proven herself to be a Content Queen, and particularly enjoys getting stuck into projects that allow her to explore her creative side. 

Outside of work, Rachel enjoys a wide range of hobbies, including rugby, singing, reading, and spending time with her family and three labradors.

Carl Atterbury

PPC Team Leader

Carl joined Wildcat in 2023 with a wealth of experience in PPC. He has experience working with a wide range of clients, industries and budgets, from small local businesses all the way to international e-commerce businesses. Carl has a particular interest in strategic planning and forecasting. He is passionate about data analysis and creating sustainable long-term cross-channel strategies.

In his spare time, Carl enjoys keeping fit by lifting weights, bouldering and running. He’s also a keen musician, having played the double bass and bass guitar for 20 years.

Dariusz Baczyk

Team Lead & Technical SEO Account Manager

With a degree in Computer Science and SEO experience dating back to 2017, Dariusz has a wide range of SEO skills and knowledge. His specialist knowledge of Technical SEO has firmly landed him the title of Wildcat’s Technical Wizard, and he has recently taken on the responsibility of Team Leader for the Panthers Team.

In his spare time, Dariusz loves hiking, experimenting and trying new coffees and loves learning new things. He is currently learning more about CRO and AI and how this could benefit our clients.

Jamie Stowe

SEO Account Manager

With a degree in Film and TV production, and a varied career history, Jamie made the move to marketing with a Masters degree in Digital Media Management. He has since worked in SEO at Agencies across Sheffield, before joining Wildcat and working his way up to SEO Account Manager. Jamie has a particular interest in backlinks and Digital PR and has recently gained a client a valuable backlink from Forbes!

In his spare time, Jamie is an avid foodie and loves trying new restaurants and cuisines. He also loves to travel and spent a year travelling to Australia after university.

Andy Blanchard

SEO Executive

Andy joined Wildcat in 2023 after starting his digital marketing career in-house for a local Sheffield company. Since joining, he has developed a strong interest in Technical SEO and has strong skills in Account Management. 

Outside of work, Andy loves music and plays in a couple of bands. He also enjoys rock climbing, cycling, photography and good food.

Siena Russell

Client Success Coordinator

Siena joined us in 2023 with a background in sales and digital marketing. She leads on client relationships across the company, ensuring that our customers are happy throughout their journey with us, from their initial consultation through to onboarding and beyond. 

Outside of work, Siena enjoys travelling and getting stuck into the local culture. She likes to make the most of her experiences and particularly enjoys watching sunrises and sunsets from beautiful locations around the world.

Thea Chapman

Senior SEO Executive

Thea has a wealth of experience in SEO, having previously worked for other Digital Marketing Agencies in Sheffield. She has a particular interest and skills in Technical SEO, but is more than willing to get stuck in and give anything a go. 

Outside of work, Thea spends most of her time with her children, but also loves reading, photography and gardening. 

Tom Brookes

PPC Executive

Before joining Wildcat, Tom worked across different industries, building skills in sales and customer service. He later developed a passion for digital marketing whilst working on personal marketing projects and freelance ventures, and gained numerous certifications in PPC and Social Media. 

Outside of work, Tom enjoys staying active by going to the gym and hiking. He also loves travelling and motorbiking.

Rich Ayre

Head of Growth

Rich joined us in May 2024 to head up our growth team. With years of experience helping other agencies to grow, Rich joins us at an exciting time as Wildcat is working on a five-year plan to become one of the biggest agencies in the UK.

Outside of work, Rich is a father to three children, which keeps him very busy! He’s also recently started running again to keep fit and loves a bit of DIY.

Kezia Humphries

SEO Executive

Kezia joined us in July 2024 after completing a CIM Certificate in Digital Marketing and gaining experience in Content SEO at another Sheffield agency.

In her spare time, Kezia loves to get outdoors, bouldering, hiking and travelling.

More blogs.

View all

October Digital Marketing News Roundup

October 16, 2024

In this month's digital roundup our news mostly revolves around the Google-verse, with changes made or announced that you should…

Thea Chapman

News

Why Are My Competitors Still Ranking Above Me?

October 15, 2024

If you’re already putting time and effort into your SEO strategy, it can be highly frustrating when your competitors are…

Kezia Humphries

SEO

Entrepreneurial Cities Report 2024: The UK’s Most Entrepreneurial Cities Ranked

October 8, 2024

The current economic climate is challenging for businesses and individuals, however, difficult times often breed a new wave of entrepreneurs.…

Rachel Davies

News