extension-cookieman icon indicating copy to clipboard operation
extension-cookieman copied to clipboard

htmlCookieRemovalPattern for GA4 tag

Open agendartobias opened this issue 2 years ago • 3 comments

Hey, sory this is not a bug but anyway, does anyone know the right htmlCookieRemovalPattern for GA4 tag/cookie?

agendartobias avatar Jan 27 '23 13:01 agendartobias

@agendartobias how does the cookie name look like?

Which cookie is missing in https://github.com/dmind-gmbh/extension-cookieman/blob/master/Configuration/TypoScript/TrackingObjects/GoogleAnalytics.typoscript ?

jonaseberle avatar Jan 27 '23 14:01 jonaseberle

It looks like: _ga_XYZSB7W6C4

So i dont know if the removal pattern like this is correct:

htmlCookieRemovalPattern = ^_ga_GTM\-\d+$

agendartobias avatar Jan 30 '23 09:01 agendartobias

Yes, that looks like a bug. htmlCookieRemovalPatterns of _ga_--container-id-- and _gac_--property-id-- are wrong.

https://github.com/dmind-gmbh/extension-cookieman/blob/master/Configuration/TypoScript/TrackingObjects/GoogleAnalytics.typoscript#L49

https://github.com/dmind-gmbh/extension-cookieman/blob/master/Configuration/TypoScript/TrackingObjects/GoogleAnalytics.typoscript#L57

Should be just htmlCookieRemovalPattern = ^_ga_ / ^_gac_. Would you like to do a pull request @agendartobias ?

jonaseberle avatar Jan 30 '23 09:01 jonaseberle