- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
// wrap analytics cookie modules or code in this kind of function
(function(){
function run_analytics_cookie_script(){
// run your module here, or put this code inside your module and put the module's internal code here
// ****************************************
// EDIT HERE
// ****************************************
}
// ****************************************
// NO NEED TO EDIT PAST THIS POINT
// ****************************************
setTimeout(function(){
// ensure cookie blocking only happens for non-US users
if(window.gdpr && window.gdpr.country_code !== 'US'){
// this will make sure analytics runs whether user accepts analytics OR all cookies
window.gdpr && window.gdpr.on('gdpr_accept_analytics_only', run_analytics_cookie_script);
window.gdpr && window.gdpr.on('gdpr_accept_all_cookies', run_analytics_cookie_script);
}
// if user is from the US, run cookies as normal
else{
run_analytics_cookie_script();
}
},1000);
})();