Event Tracking

Track Main Menu Clicks in Google Tag Manager

Track main menu usage on your site with GTM

A very common thing that I setup tracking for on a variety of pages for different companies is how their main menu is used across the site. The main menu is usually where most of your visitors will look at if the page they landed on didn’t really hit the mark. That’s if you’re lucky, otherwise they’ll just hit the back button at go back to what ever Google search that led them to you in the first place.

Sites usually invest some thought in the navigation and by that it’s of course important to measure how your site’s visitors will use it. In Google Analytics you can of course see how many of your visitors that looked at, say your Product Overview page. You can also see how many of them that came from, say the start page or a specific product page. But you can’t really see how many that used your sites navigation in order to from one page to another.

Luckily, you can set up tracking on that using Google Tag Manager in basically a few minutes.

Read More

Track file downloads with Google Tag Manager

If you have files for download on your site, I’d guess that you’d want to track if people are downloading them? Fear no more, with just a few minutes work in Google Tag Manager you’ll be set. The end goal here is to make sure that we track the appropriate file types and then send that information onto Google Analytics with an event.

This will make use some simple Javascript, but do not fret, I’ll walk you through it.

The first thing you need to figure out is if you have any odd filetypes on your site, other than the regular stuff. If that’s the case, just make a note of them because you’ll need to adapt my code later on.

Read More
gtm-event-copy-clipboard

Send an event into Google Analytics using GTM when a visitor copies text from your page

We all want to measure our pages in the best possible way, and I’m always trying to figure out how to lower the bounce rates where applicable. One of the things that visitors to your page can do is to copy some text, in order to send it in an email, to use it when sharing something on social media and so forth. And if a visitor is actively copying text from a page, that’s interaction to me.

So how can we possibly know if a visitor to your page as copying some text or not?

Well, it’s actually pretty easy. And using Google Tag Manager we can easily pass this information onto Google Analytics and start measuring what pages on your site people are copying stuff from.

Read More
Google Tag Manager and Contact Form 7

Contact Form 7 on WordPress with Google Tag Manager

Just the other day, I was holding a lecture for some students studying web analytics here i Stockholm. I was there to talk about Google Tag Manager and after some hours I received a question we looked into.

 

How do I send a Form Submit to GTM via the Contact Form 7 plugin in WordPress?

This is actually very easy to achieve, and I’ll walk you through both ways of doing it right here. Both with a GTM Plugin in WordPress, and without.

Read More
Track outbound links with Google Tag Manager

Track outbound links in Google Tag Manager

Tracking outbound links is a nice to have feature in every Google Analytics implementation, and making it work with Google Tag Manager is very easy.

In short, what we want to do is track links that are being clicked on any given page and then send an event to Google Analytics if the link goes to any page outside current domain, making it external.

This post will introduce you to theĀ Link Click Listener in Google Tag Manager and how to configure it to listen to exactly what we want.

Read More