Should I Use Page Tags, Log Files or a Hybrid Solution?

We frequently encounter these questions when implementing web analytics solutions on behalf of our customers. Therefore we would like to present some facts and offer our thoughts and suggestions on the matter.

What is a Log File?

When a web page is requested from within your web browser (Internet Explorer, Firefox etc.), the request is made to a web server that fetches the page from either a database or its file system. When the server collects this page and all its associated images, Flash objects and the like, it records all these tasks in a log file. This log file includes data on who requested the page? What site referred them to your site? What time did they make the request? What page/image/object was requested?

These logs can then be processed at a later date to monitor your website activity.

What is a Page Tag?

This is a small piece of JavaScript code placed in each page of your website. Every time the page is requested it automatically runs the JavaScript in the web browser and sends back similar information to that stored in a log file, to a remote server. The data is captured on the remote server in a log or database and can then be processed to monitor website activity.

Page tagging also allows you unique access to capture client side data such as screen resolution, screen colour depth and the java version they are running. This gives you the opportunity to ensure that your website is functional and operational for all of your users.

Which One Should I Use?

As with most technical solutions the answer relies upon the individual requirements of the user, based on what data you require and preferences on data capture. Below is a cost-benefit analysis of each solution.

Benefits Costs
Page Tags
  • Accuracy due to cache busting headers of page tag
  • Client browser information - Language, Java version, screen resolution
  • Overcomes the problem of not having access to the server log files
  • Can track Web 2.0 applications such as Flash movies and AJAX
  • Can track on page events and outbound links
  • Vendor lock-in as you have no access to the raw data
  • If tag fails to load, the page may load with errors or not at all
  • Tags must be added to every page. No tags = no data

Log Files
  • Captures Robot/Spider activity, useful for tracking click fraud bots
  • The web server will always produce logs if the server is operational
  • Log files capture web server errors and page redirects
  • No vendor lock-in as you can load log files into any log analyser
  • Possibility of a one off cost rather than monthly fee

  • Tedious to filter out all robot/spider activity
  • No client browser information logged

As you can see from the table there are advantages and disadvantages to using both techniques for data capture, which is why we suggest a hybrid solution combining both methods.

The ability to unlock the full potential of your web analytics data comes from using a combination of page tags and server log files. The page tags will give you some of the unique benefits highlighted above, however the server log files will give you a lot of additional benefits.

Server log files will allow you to collect all available data including, for example, visits from search engine spiders and robots as well as data on rss readers, telling you how many people are downloading your rss feeds.

Using server log files will also give you complete control over your web analytics data. This is because the data sits on your own web server, giving you 24 hour access and preventing others from accessing it, providing your server is locked down correctly. (see "Is your web analytics solution secure?")

Further Discussion

If you wish to discuss this and any other web analytics issues please feel free to contact our Web Analytics team on +44 (0)1293 403636 or visit our Web Analytics Forum.

Bookmark to:
Add 'Should I Use Page Tags or Log Files?' to Del.icio.us Add 'Should I Use Page Tags or Log Files?' to digg Add 'Should I Use Page Tags or Log Files?' to FURL Add 'Should I Use Page Tags or Log Files?' to blinklist Add 'Should I Use Page Tags or Log Files?' to reddit Add 'Should I Use Page Tags or Log Files?' to Technorati Add 'Should I Use Page Tags or Log Files?' to Socializer Add 'Should I Use Page Tags or Log Files?' to Stumble Upon Add 'Should I Use Page Tags or Log Files?' to Google Bookmarks Add 'Should I Use Page Tags or Log Files?' to Rojo

Email this page to a friend


Email this page to a friend
Scientific Computers Limited is a company registered in England and Wales. Registered number: 639839. Registered Office: Jubilee House, Jubilee Walk, CRAWLEY, West Sussex, RH10 1LQ. VAT Number: GB190362470