Google introduced a new function on Google Analytics in mid-February: Autotrack. This article shows for whom this function is suited and how Autotrack can be integrated into the website.
Google’s Autotrack has a complete, yet lean library of all the relevant features that you need to track the user behavior on your website. According to Google, this new option makes it much easier to implement the desired form of tracking and also simplifies the use of features that users previously had trouble with.
Figure 1: Google Analytics Autotrack © analytics.blogspot
Since Google Analytics was introduced in 2005, evaluation of website data has always followed the same pattern: A standard tracking snippet is integrated on the website and all the necessary data collected.
Later on, event tracking was added. However, in order to track specific events on your website, you still have to add specific codes in appropriate positions. With the many different options and continuous development of websites (ranging from static documents to complex, dynamic applications), event tracking continuously became more sophisticated and more difficult for webmasters.
This is why Google Analytics Autotrack was recently introduced as a solution to this problem.
The new tracking using the Autotrack library is primarily intended for website operators who are unable to integrate or edit a specific event tracking code on their websites or those who only wish to track a few events. If website data are only recorded via the standard Google Analytics tracking snippet and it is not possible to specify individual sections or elements using individual event codes, you can use Autotrack to automatically identify the user behavior. In this case, the advantage of Autotrack is that all you need to do is "mark" the position of the events and the corresponding feature from the library does the rest.
However, the integration is not as fully automated as one might think. You still need to add the necessary event tracking Autotrack snippet in advance.
If you have already integrated specific event tracking codes on your website, you need to look at the Github library before using Autotrack and check if adding this new feature on your website is actually rational.
In order to integrate Autotrack on your website, you need to add the following line to the conventional Universal Analytics Code:
This enables you to use the Autotrack library on your website.
<!-- Google Analytics -->
ga('create', 'UA-XXXXX-Y', 'auto');
<!-- End Google Analytics -->
You can also modify the tracking snippet further in order to only use selected plugins and features.
Example: If you only want to add eventTracker and outboundLinkTracker, you should use the codes below instead of ga('require', 'autotrack');
Outbound forms: By default, Google Analytics does not record any actions on which the user is redirected from one website to another after clicking on a form. By adding the Autotrack library, this will now be recorded automatically as an "Outbound form" and saved in the events report.
Outbound links: Similarly, individual tracking codes do not record actions on which a click results in a redirect to an outbound link. Autotrack is able to identify this and record it as an event under "Outbound links". Thus, you do not have to implement event tracking codes or add trackOutboundLink-Events using an on-click attribute (onclick="trackOutboundLink('http://www.example.de');) to outbound links.
URL changes: In general, Google Analytics only records one page visit per URL. Diverse metrics, such as dwell time and bounce rate, are then calculated for this page visit. Even if the content of a website is generated via a History API, etc. and thereby alters the URL, Analytics is only able to record the first page that was called. Autotrack can automatically identify such URL changes and record these as separate page visits. However, this still doesn’t make it possible to track hash changes (#).
Media queries: In terms of responsive web design, it is important that many website operators and online marketing managers keep track of, for example, how often their website is viewed on smartphones in portrait or landscape formats. Autotrack makes it possible to collect this information as dimensions in Analytics. This works through the so-called "Breakpoints".
With the standard Analytics tracking, these data could also be collected using customized dimensions and additional tracking codes. With Autotrack, you can track media queries using the mediaQueryTracker plugin. The configurations specified in the mediaQueryDefinitions tell the plugin which media queries are active and how often. Before using the mediaQueryTracker, you must first create and activate customized dimensions in the respective property in Google Analytics. Google has published a comprehensive document on Github for the proper integration of media query tracking.
Declarative event tracking: Compared to conventional Analytics event tracking codes, Autotrack now makes it much easier to integrate the so-called declarative events. Here, clicks and other forms of user interactions on a website are automatically identified using pre-specified markups and sent to Analytics.
<button data-event-category="Video" data-event-action="play">Play</button>
In the above example, a video is defined as a declarative event in order to record the event in Analytics if a user clicks to view the video.
Figure 2: Event tracking in Google Analytics
Autotrack has certainly managed to simplify tracking on websites to a certain extent. At the same time, it also brings along several setbacks for website operators and developers.
The name Autotrack is well intended but incorrect. Google’s Autotrack is certainly not fully automated and, just like the standard code, also requires additional adjustments, implementations, and settings in both the website’s source code and Google Analytics.
For inexperienced website operators who only require specific event tracking features, such as outbound links and forms, Autotrack is definitely a good alternative to the standard tracking code. However, if you are an online market and experienced webmaster, it is advisable to use the conventional tracking and implement event tracking using individual snippets. Either way, certain events like scroll tracking must still be done using the previous codes.
Published on 05/20/2016 by Daniel Herndler.
Daniel works as senior SEO manager at Get On Top GmbH in Salzburg. His favorite topics are conversational and semantic search. Daniel also admits to being a true TV series junkie – as a huge “Game of Thrones” and “House of Cards” fan, he is already plotting his move to the Seven Kingdoms.