« Back to front page

Google Analytics Autotrack

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.

symbole1 Google Analytics

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.

Who is Autotrack meant for?

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.

How do you integrate Autotrack on your website?

In order to integrate Autotrack on your website, you need to add the following line to the conventional Universal Analytics Code:

ga('require', 'autotrack');

This enables you to use the Autotrack library on your website.

&lt!-- Google Analytics --&gt

&ltscript&gt
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga(‘create’, ‘UA-XXXXX-Y’, ‘auto’);

ga(‘require’, ‘autotrack’);
ga(‘send’, ‘pageview’);
&lt/script&gt
&lt!– End Google Analytics –&gt

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’);

ga('require', 'eventTracker');
ga('require', 'outboundLinkTracker');

What can you track with 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”.

740x400-200x200-GoogleAnalyticsAutotrack-02-2 Google Analytics

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.

Example:
&ltbutton data-event-category="Video" data-event-action="play"&gtPlay&lt/button&gt

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.

autotrack-events Google Analytics

Figure 2: Event tracking in Google Analytics

What are the advantages and disadvantages of Google Analytics Autotrack?

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.

Advantages:

  • Automated tracking of outbound links and forms.

  • Improved tracking of single-page websites.

  • Tracking of media queries using customized dimensions.

Disadvantages:

  • Requires manual implementation in your template / code.

  • No standardized integration via the Google Tag Manager.

  • Additional Analytics tags are still needed (only a partial solution!)

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.

Conclusion:

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.

Ryte users gain +93% clicks after 1 year. Learn how!

Published on May 20, 2016 by Editorial Team