CardinalPath / gas

Google Analytics on Steroids. A Google Analytics implementation with more power features.
Other
592 stars 78 forks source link

Feature Request: Tag everything you like! #25

Closed resolutionmediagermany closed 12 years ago

resolutionmediagermany commented 12 years ago

Hi Eduardo,

What if we could specify Events/Pageviews for every element on a page we like to track. Say we want to track interactions with jquery accordeon

. It would be great to specify this, maybe directly in the JS code, similar to the OpenTag tag management js (https://github.com/QubitProducts/OpenTag/wiki/How-it-works).

I am not sure if it makes sense to specify rules within the tracking Code calls (e.g. _gasTrackEverything), as there can be lots of information to it, but I'll leave that up to you, as you are the master ;-). Maybe it could look similar to the _addHook function, but I wonder how more than one rule could be specified then...:

_gas.push(['_gasTrackEverything', '_trackEvent', { object: 'div', id: 'track', page: 'website.com/test.html' },click]); _gas.push(['_trackEvent', 'jQuery',id,object]);

Regards,

Sebastian

eduardocereto commented 12 years ago

Maybe a better alternative to this use case is to use specific HTML markup to define trackable objects. Something like this;

<a href="#" data-trackgas="_trackEvent|CategoryX|ActionY|LabelZ|123" >When clicking here you'll get an event</a>