How to implement matomo Consent in Typo3?


#1

Hi there!
I’ve tried to implement the consent mode, but I didn’t get it.
(JavaScript Tracking Client: Integrate - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3)

I’ve got a popup, where the user may consent into tracking:

Für statistische Zwecke......

Ich bin mit der Verwendung des Besucher-Trackings einverstanden: JA NEIN

I’ve put the requireConsent into the matomo-code

page.headerData.200 = TEXT
page.headerData.200.value (

)

And I have some code to check the consent. But I don’t know how to set/use the matomo cookie!?

page.footerData.563 = TEXT
page.footerData.563.value (

)

Has someone a practical example?

Or will there be an easy to use plugin published soon?

Best regards - alexinge!


(Lukas Winkler) #2

Hi,

I’m not that familiar with the integration in Typo3, but you’ll need to modify the JS in the tracking code so it includes _paq.push(['requireConsent']); before the trackPageview line.

And then you need to make a event handler that calls _paq.push(['rememberConsentGiven']); on click on “Ja”.