Skip to content

Instantly share code, notes, and snippets.

@tpitale

tpitale/gist:151540

Forked from mig/gist:151538
Created Jul 21, 2009
Embed
What would you like to do?
cookies = document.cookie.split(';');
utmz = "";
for(i in cookies) {
if(cookies[i].test(/^__utmz/)) utmz = cookies[i];
}
medium = utmz.match(/".*?utmcmd=([a-z]+)\|/)[1];
adwords = utmz.match(/.*?utmgclid=([_0-9A-Za-z]+)\|/)[1];
if(medium == 'cpc' || adwords) firstTracker._setVar('CPC');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.