Closed (duplicate)
Project:
Google Analytics
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Jul 2011 at 16:29 UTC
Updated:
27 Jul 2011 at 17:54 UTC
Old traditional tracking code:
var pageTracker = _gat._getTracker("UA-XXXXX-X");
pageTracker._trackPageview(location.pathname + location.search + location.hash);
New asynchronous tracking code:
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview', location.pathname + location.search + location.hash]);
Read more: http://www.searchenginepeople.com/blog/how-to-track-clicks-on-anchors-in-google-analytics.html#ixzz1TK8RHxQrThere needs to be an option to enable anchor tracking in Drupal. Currently we would have to go into the module and edit the code, which is not very flexible and makes updating to new versions of the module cumbersome at best. Any thoughts?
Comments
Comment #1
hass commented#231451: Add hook to alter data before sending it to browser
You could also put this into custom code snippets. With a condition you can make sure that this is only executed if google does not log it out of the box.
Comment #1.0
hass commentedSimple code fix