Skip to content

Commit a86aba3

Browse files
authored
Merge pull request #141 from stackabletech/feat/disable-cookies
feat: disable cookies and remove consent cookie banner
2 parents 86bacc1 + 608a331 commit a86aba3

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/partials/head-scripts.hbs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,11 @@
1-
{{#with site.keys.googleAnalytics}}
2-
<script async src="https://www.googletagmanager.com/gtag/js?id={{this}}"></script>
3-
<script>function gtag(){dataLayer.push(arguments)};window.dataLayer=window.dataLayer||[];gtag('js',new Date());gtag('config','{{this}}')</script>
4-
{{/with}}
51
{{#with site.keys.enableTracking}}
6-
<script type="text/javascript"> var tCPrivacyTagManager = "gtm"; </script>
72
<script>
8-
var consent = document.createElement("script");
9-
if(window.location.pathname.indexOf("/en/") > -1){
10-
// Default is EN Cookie Banner if /en/ in path
11-
consent.src = "https://cdn.trustcommander.net/privacy/4616/privacy_v2_27.js";
12-
} else {
13-
// Default is DE Cookie Banner
14-
consent.src = "https://cdn.trustcommander.net/privacy/4616/privacy_v2_9.js";
15-
}
16-
consent.type = "text/javascript";
17-
document.head.appendChild(consent);
18-
</script>
19-
<!-- Matomo consent with trustcommander -->
20-
<script type="text/tc_privacy" data-category="2">
21-
console.log('consent provided for Matomo')
223
<!-- Matomo -->
234
var _paq = window._paq = window._paq || [];
245
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
256
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
26-
_paq.push(["setCookieDomain", "*.stackable.tech"]);
277
_paq.push(["setDomains", ["*.stackable.tech"]]);
8+
_paq.push(['disableCookies']);
289
_paq.push(['trackPageView']);
2910
_paq.push(['enableLinkTracking']);
3011
(function() {

0 commit comments

Comments
 (0)