Quantcast

Accuracy of Analytics: The Placement of Code


Ever wonder how your websites’ data in your analytics reports would be affected based on the placement of your analytics code on the page? Eric Enge and his team at Stone Temple Consulting have begun answering this question by testing the placement of the same analytics code within the top and bottom of a web page.

With the help of Dennis Mortensen and the IndexTools team, we setup a more disciplined test. In this test, we placed Javascript both at the top and the bottom of the web pages for two sites (Tool Parts Direct and City Town Info).

The scripts were basically identical, except they fed their data into 2 different IndexTools accounts. This allowed us to more accurately measure the impact of placement on counting of visitors to the site. While we implemented the two scripts site wide, we focused our analysis on the Page Views to the home page.

It is a well known fact that data quality from web analytics isn’t the greatest and can be very far off from 100%. Additionally, it should be trends that analysts should focus in order to gain a sense of the entire picture for you business’ strategy.


Suggested Action(s)

Our suggestion would be that if your page load is normally pretty snappy (total page load time of under 3 or 4 seconds), then keep your Javascript at the bottom, and remove any risk related to analytics vendor downtime. The small loss of data you see in this scenario should not be a significant factor in the value of your analytics data.


But, if your page load time is a bit slower (4 seconds or more), you may want to consider placing your analytics Javascript at the top of your web page. Your data loss will be larger, and also the nature of the lost data may start to differ.

Subscribe by Email

Speak Your Mind

*