21ST DECEMBER 2015 / WEB ANALYTICS

Enabling Optimizely native Google Analytics Integration within Google Tag Manager

As you may already know, Optimizely has an in-built Google Analytics integration, which will allow us to track the experiments and variations being showed to a client using custom dimensions. For enabling them, you'll need to put the following lines after the create command and the pageview one: window.optimizely = window.optimizely || []; window.optimizely.push("activateUniversalAnalytics"); This is a bit tricky when using Google Tag Manager…

26TH NOVEMBER 2015 / WEB ANALYTICS

Closing "Inside GTM" Blog, all content now hosted here!

Two years ago I started "Inside GTM", a blog focused on Google Tag Manager and other TMS tools along with @nikalytics, but we haven't published anything since February, so we've agreed to close it :( . After publishing the notice in Twitter, some people asked what was going to happen with the content already hosted there, so I'm moving all the content I wrote there in my own blog, this is in this blog. Time to close the gtm blog ...…

22ND OCTOBER 2015 / WEB ANALYTICS

#Tip - Finding Legacy GA code after migrating to Universal Analytics

You may have already migrated your Google Analytics Implementation to Universal Analytics. It may happen that you still have some legacy ga snippet lying around in some pages without having noticed it, for example in some landing pages that are not belong the default CMS system/templates. But we can easily check this out just looking at Google Analytics data. It's as easy as crossing your pageview/event reports with the "Data Source" dimension. This…

24TH SEPTEMBER 2015 / WEB ANALYTICS

Finding pages missing Google Tag Manager snippet within Google Tag Manager

This time, we'll be using Google Tag Manager itself, to find pages in our site that may be missing Google Tag Manager. Ok, it may sound strange, but was not able to find any other way to say it . Basically we're going to use a custom html tag, to detect is the previous page had loaded Google Tag Manager code. To achive this we'll be using a single Custom HTML tag ,a cookie and the onbeforeunload event. The following flow chart will show…

25TH AUGUST 2015 / WEB ANALYTICS

Tracking the Hover Intent with Google Tag Manager

At the moment, Google Tag Manager listeners are limited to Form Submits, Link Clicks and Clicks (for any DOM element). We are going to write a custom listener for hover intents by users. This means that we're not only to do something when the user pass the mouse pointer over an element, but instead we're waiting a certain time with the mouse over the element before submitting the action to GTM. For this we're going to use the mouseenter and…

12TH AUGUST 2015 / WEB ANALYTICS

Tips for debugging your Google Tag Manager implementations

I'm going to share some of the tips and tricks I've learnt (and that I use on my daily basics work) in the almost past 3 years since Google Tag Manager was released. Tip #1 - Grabbing a dataLayer value from the console If we want to grab the current value in the Google Tag Manager's dataLayer, it offers a built-in get method for it. When GTM loads a global object is created named google_tag_manager, that has a key that is the current GTM Id…

10TH AUGUST 2015 / WEB ANALYTICS

Preventing duplicate transactions in Universal Analytics with Google Tag Manager

One of the most common headaches while implementing the ecommerce tracking on a site is trying to match the tracked transactions by the shop backend to Google Analytics. As most tracking solutions are JavaScript based, there's a small chance of losing some of them and there's nothing we can do without playing with the measurement protocol and some server-side tracking. Another problem that is usually present is having duplicated transactions. And…

7TH AUGUST 2015 / WEB ANALYTICS

Locating legacy hardcoded events and pageviews using Google Tag Manager

If you're migrating from classic Google Analytics (_gaq object) to Universal Analytics, or planning to migrate your old hardcoded events to use Google Tag Manager you may have run in the case that not all old tracked was really removed from the site by the client. And it's really hard to find it out. We'll learn today how to track this situation natively using just in-built Google Tag Manager features and allowing us to track all those…

6TH AUGUST 2015 / WEB ANALYTICS

Detecting and tracking page's printing intent with Google Tag Manager

I was looking for something new to track within the websites interactions, and I decided to give a try to track the user's intent to print our pages. So I'm going to show you my own approach for tracking this user action using Google Tag Manager. We'll need to create a new tag with the following code will allow us to track the user printing intent when he clicks on printing from the File Menu or when he uses the keys shortcut (Control-P on Windows)…

5TH AUGUST 2015 / WEB ANALYTICS

Tip: Maintaining Proper Session Attribution in GA when using OAuth providers with Google Tag Manager

If you using Facebook, Twitter, Github or any other service to autenticate your users, you may have noticed that they end showing up as referral traffic from the oauth service. User lands from CPC -> Logs in -> Respawns a new visit as referral We could think on adding those domains to the ignored referrals within our view configuration, but this will and hidding the real referal traffic from those networks. The screenshot above is an example…