No need to use window.Cookies, just Cookies works.
This commit is contained in:
parent
aa3a5d3808
commit
e59dc13d4d
1 changed files with 6 additions and 6 deletions
|
|
@ -16,13 +16,13 @@ _paq.push(['setTrackerUrl', matomoTrackingApiUrl]);
|
|||
_paq.push(['setSiteId', idSite]);
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
if (typeof window.Cookies !== 'undefined' && Cookies.get('cookieconsent') === 'accept') {
|
||||
if (typeof Cookies !== 'undefined' && Cookies.get('cookieconsent') === 'accept') {
|
||||
_paq.push(['setConsentGiven']);
|
||||
}
|
||||
|
||||
var googleAnalytics = '{{ .Site.GoogleAnalytics }}';
|
||||
if (cookieConsent) {
|
||||
if (typeof window.Cookies === 'undefined' || Cookies.get('cookieconsent') !== 'accept') {
|
||||
if (typeof Cookies === 'undefined' || Cookies.get('cookieconsent') !== 'accept') {
|
||||
window['ga-disable-' + googleAnalytics] = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue