Skip to content

Instantly share code, notes, and snippets.

@dalmaer
Created May 10, 2010 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalmaer/396587 to your computer and use it in GitHub Desktop.
Save dalmaer/396587 to your computer and use it in GitHub Desktop.
HummingbirdTracker = {};
HummingbirdTracker.track = function(env) {
delete env.trackingServer;
delete env.trackingServerSecure;
env.u = document.location.href;
env.bw = window.innerWidth;
env.bh = window.innerHeight;
env.guid = document.cookie.match(/guid=([^\_]*)_([^;]*)/)[2];
env.gen = document.cookie.match(/gender=([^;]*);/)[1];
env.uid = document.cookie.match(/user_id=([^\_]*)_([^;]*)/)[2];
$('body').append('<img src="http://localhost:8000/tracking.gif?' + jQuery.param(env) + '"/>');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment