Skip to content

Instantly share code, notes, and snippets.

View natehoffy's full-sized avatar

Nate Hoffelmeyer natehoffy

View GitHub Profile
// sample get cookie value function for reference
function getCookie(cname) { // Simple getCookie utility stolen from https://www.w3schools.com/js/js_cookies.asp
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
drift.on('ready', function() {
drift.api.setUserAttributes({
query_param1: value1, //replace with your param and pass value
query_param2: value2, //replace with your param and pass value
query_param3: value3, //replace with your param and pass value
query_param4: value4, //replace with your param and pass value
...
})
})