Last active
August 29, 2015 14:20
-
-
Save emaV/dc13ab6ced39f858cc64 to your computer and use it in GitHub Desktop.
BOOMR addVar guid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var guid; | |
if(!BOOMR.utils.getCookie(impl.cookieName)) { | |
BOOMR.info("Could not find a cookie for " + impl.cookieName, "GUID"); | |
guid = impl.generate(); | |
if (!BOOMR.utils.setCookie(impl.cookieName,guid, impl.expires)) { | |
BOOMR.subscribe("before_beacon", function() { | |
BOOMR.utils.setCookie(impl.cookieName,guid, impl.expires); | |
}); | |
} | |
BOOMR.info("Setting GUID Cookie value to: " + guid + " expiring in: " + impl.expires + "s", "GUID"); | |
} else { | |
guid = BOOMR.utils.getCookie(impl.cookieName); | |
BOOMR.info("Found a cookie named: " + impl.cookieName + " value: " + guid, "GUID"); | |
} | |
BOOMR.addVar({guid: guid}); | |
return this; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment