TrackBat allows you to embed images into your documents / sites with Google Analytics tracking information. This allows you to collect page-view information where you wouldn't otherwise be able to!
This very readme, written in markdown, is using TrackBat to collect how many people are viewing this page on GitHub.
TrackBat works by simply passing on the information in your image querystring to a node.js server, which then in turn passes that information to Google Analytics.
- TrackBat uses the "Unversal Tracking" beta feature of Google Analytics. Your account must have this enabled. More information about this here
- TrackBat will accept all the Google Analytics tracking parameters listed on this page
- Currently, every page view or event will be recorded as from a different user. There is NO session / cookie persistence.
- There will be NO user-specific information captures. Geographic information will always be that of the trackbat server. Your User's IP addresses and geographies will be lost
- Be sure to HTML-escape whenever possible. Google Analytics does not return any error codes for malformed data
- trackBat does not store or manipulate your request information in anyway. The code is hosted at https://github.com/evantahler/trackBat for your review.
Simply create an image tag on your page where the source is something like
http://trackbat.com/api/track?tid=UA-42260760-1&dh=trackbat.com&dp=/readme.md&dt=readme (This is the tracking code for this very page)