Linus Larsson's blog

Trigger event in GTM when mouse pointer leaves window

Published on 2018-03-27 in GTM

Wouldn’t it be nice to have an event in Google Tag Manager for when the mouse pointer exits the browser window? This can be achieved easily by implementing a listener with a custom HTML tag. The only thing you have to do is create a new custom HTML tag and paste the script below. I...

Continue reading »

Create custom UTM parameter names

Published on 2018-03-25 in GTM

Tired of having to type the entire UTM string each time you want to track a link? With this setup in Google Tag Manager you can create your own names for the UTM tracking parameters without losing the tracking of the standard ones. I’m gonna show you an example of why this is worth the...

Continue reading »

Simple function to add trailing slash and lower case in GTM

Published on 2018-03-25 in Analytics

Have you noticed that some of your pages are counted in different rows in Google Analytics? Two of the most common reasons to this are trailing slash and pages with different case types. Google Analytics imports the requested URI in the exact format that is typed in the browser. This means that if you visit...

Continue reading »

Remove possible PII query data in Google Analytics

Published on 2018-03-15 in Analytics

Have you noticed that Google Analytics page view data sometimes include query strings? There are a lot of positive aspects to this, e.g. the possibility to auto track AdWords, adding UTM parameters etc. But in some cases this could be a real headache. What if your website puts sensitive data in the query string? One...

Continue reading »

Importing HotJar data into Google Analytics

Published on 2018-01-09 in Analytics

Are you using HotJar to get valuable insights of what your visitors are doing on your website? I bet you wouldn’t mind getting that data integrated with Google Analytics to make even more advanced analyses. This post is basically an extension to a post that one of my colleague, Eivind Savio,  wrote some time ago....

Continue reading »

Adding Facebook pixels for multiple markets with only one tag

Published on 2018-01-02 in GTM

Are you tired of having multiple tags in your GTM for Facebook pixels in different markets? If you have a domain with different markets as subfolders (e.g. “.com/de”) then you probably are using one pixel tag for each market, i.e. if you have 8 markets on your domain then you use 8 different tags to...

Continue reading »

1 2 3
Cookie Settings

© Copyright - - 2018-2024