Entourage.js is automatic download tracking for asynchronous google analytics. Entrourage.js lightweight (339 bytes gzipped) JavaScript solution that can automatically add tracking support for downloads.
It is framework agnostic, unobtrusive.and leaves the markup clean without requiring any inline JS usage.
There is also a filter provided which enables us to track only the selected file-types.
Google Analytics tracked file downloads automatically and out-of-the-box, but it doesn’t. An extension was needed – so be it. But if it was going to be done, I wanted to make sure it was done right!
I set goals for Entourage.js before a single line of code was written. Entourage.js needed to embody the following:
- Automatic Tracking
- Framework Agnostic
- Unobtrusive JavaScript
- Small Footprint
Automatic
Google suggests adding an onClick event to each anchor tag you use for file downloads. I don’t want to have to do that each time I have a download. I would rather drop an extension that would do this consistently and automatically each time.
Entourage.js automatically tracks the name and extension of each file downloaded with the following convention:
/download/fileName.extension
For example, in Google Analytics Top Content, the downloads Entourage.js would look like:
/download/entourage.zip 1,504
Requirements: No Requirements
Compatibility: All Major Browsers
Website: http://techoctave.com/c7/posts/58-entourage-js-automatic-download-tracking-for-asynchronous-google-analytics