Hallo ich hoffe das mir jemand einen Tipp geben kann.
Ich will bei uns gerade einen neuen ConsentManager in die Seite bringen. https://github.com/orestbida/cookieconsent
in der Doku dort wird gezeigt wie man bei akzeptieren usw des Consent Managers die Daten pusht damit dann die TagManager feuern können.
onFirstAction: function(){
console.log('onFirstAction fired');
},
onAccept: function (cookie) {
console.log('onAccept fired!')
},
onChange: function (cookie, changed_preferences) {
console.log('onChange fired!');
// If analytics category is disabled => disable google analytics
if (!cc.allowedCategory('analytics')) {
typeof gtag === 'function' && gtag('consent', 'update', {
'analytics_storage': 'denied'
});
}
},
Wir müsste es für Matomo und dessen Tag Manager aussehen.
Ich habe es bei mir mal so mit reingenommen. Finde aber über die BrowserKonsole keine Daten:
if (cc.allowedCategory('technisch')) {
typeof gtag === 'function' && gtag('consent', 'update', {
'technisch': 'active'
});
window._mtm.push('event': 'consent_update',
'consent-status': {
'technisch': 'active'
}
);
} else {
typeof gtag === 'function' && gtag('consent', 'update', {
'technisch': 'denied'
});
window._mtm.push('event': 'consent_update',
'consent-status': {
'technisch': 'denied'
}
);
}
würde mich freuen wenn mir jemand eine Lösung oder Tipps geben kann.