-
Notifications
You must be signed in to change notification settings - Fork 3
/
cookiebot-gtag-default.html
39 lines (31 loc) · 1.19 KB
/
cookiebot-gtag-default.html
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
34
35
36
37
38
39
<script data-cfasync="false" data-cookieconsent="ignore">
/*
Web Site Advantage: CookieBot gtag default [v1.1]
Sets default consent states for manually added Coookiebot code. Don't use with GTM implementation
https://bigcommerce.websiteadvantage.com.au/
Copyright (C) 2024 Web Site Advantage
*/
!function(w){
var ads_data_redaction = true;
var url_passthrough = true;
var defaultSettings = {
"ad_storage": "denied",
"ad_user_data": "denied",
"ad_personalization": "denied",
"analytics_storage": "denied",
"functionality_storage": "denied",
"personalization_storage": "denied",
"security_storage": "granted",
"wait_for_update": 2000
};
// End of settings --------
// https://support.cookiebot.com/hc/en-us/articles/360016047000-Cookiebot-and-Google-Consent-Mode
if (!w.gtag) {
w.dataLayer = w.dataLayer || [];
w.gtag = function (){w.dataLayer.push(arguments);}
}
w.gtag("consent", "default", defaultSettings);
if (ads_data_redaction) w.gtag("set", "ads_data_redaction", true);
if (ads_data_redaction) w.gtag("set", "url_passthrough", true);
}(window)
</script>