From 63722e977686e2c76c1ad536080d7b991efce398 Mon Sep 17 00:00:00 2001 From: Jonas Eberle Date: Mon, 4 Mar 2024 12:19:29 +0100 Subject: [PATCH] feat(TrackingObjects): added Google Ads, updated Analytics+Tag Manager Fixes: #325 (cherry picked from commit 957cf5351a274c6fec3af31b84b1fa42f81160f8) --- .../TrackingObjects/GoogleAds.typoscript | 171 +++++++++++++++++ .../GoogleAnalytics.typoscript | 172 +++++++++++++++++- .../GoogleTagManager.typoscript | 18 +- Resources/Private/Language/locallang.xlf | 12 ++ 4 files changed, 350 insertions(+), 23 deletions(-) create mode 100644 Configuration/TypoScript/TrackingObjects/GoogleAds.typoscript diff --git a/Configuration/TypoScript/TrackingObjects/GoogleAds.typoscript b/Configuration/TypoScript/TrackingObjects/GoogleAds.typoscript new file mode 100644 index 00000000..96a1889b --- /dev/null +++ b/Configuration/TypoScript/TrackingObjects/GoogleAds.typoscript @@ -0,0 +1,171 @@ +plugin.tx_cookieman.settings.trackingObjects { + GoogleAds { + inject = + show { + # https://business.safety.google/adscookies/ + __eoi { + duration = 6 + durationUnit = months + type = cookie_http+html + provider = Google + } + + NID { + duration = 6 + durationUnit = months + type = cookie_http+html + provider = Google + } + + __gads { + duration = 13 + durationUnit = months + type = cookie_http+html + provider = Google + } + + pm_sess { + duration = 30 + durationUnit = minutes + type = cookie_http+html + provider = Google + } + + pm_sess_NNN { + duration = 30 + durationUnit = minutes + type = cookie_http+html + provider = Google + htmlCookieRemovalPattern = ^pm_sess_ + } + + aboutads_sessNNN { + duration = 30 + durationUnit = minutes + type = cookie_http+html + provider = Google + htmlCookieRemovalPattern = ^aboutads_sess_ + } + + FPAU { + duration = 90 + durationUnit = days + type = cookie_http+html + provider = Google + } + + ANID { + duration = 24 + durationUnit = months + type = cookie_http+html + provider = Google + } + + AID { + duration = 24 + durationUnit = months + type = cookie_http+html + provider = Google + } + + TAID { + duration = 14 + durationUnit = days + type = cookie_http+html + provider = Google + } + + _gcl_au { + duration = 90 + durationUnit = days + type = cookie_http+html + provider = Google + } + + RUL { + duration = 12 + durationUnit = months + type = cookie_http+html + provider = Google + } + + FPGCLAW { + duration = 90 + durationUnit = days + type = cookie_http+html + provider = Google + } + + FPGCLGB { + duration = 90 + durationUnit = days + type = cookie_http+html + provider = Google + } + + _gcl_gb { + duration = 90 + durationUnit = days + type = cookie_http+html + provider = Google + } + + _gac_gb_--wpid-- { + duration = 90 + durationUnit = days + type = cookie_http+html + provider = Google + htmlCookieRemovalPattern = ^_gac_gb_ + } + + _gcl_aw { + duration = 90 + durationUnit = days + type = cookie_http+html + provider = Google + } + + 1P_JAR { + duration = 30 + durationUnit = days + type = cookie_http+html + provider = Google + } + + Conversion { + duration = 90 + durationUnit = days + type = cookie_http+html + provider = Google + } + + YSC { + duration = + durationUnit = session + type = cookie_http+html + provider = Google + } + + VISITOR_INFO1_LIVE { + duration = 180 + durationUnit = days + type = cookie_http+html + provider = Google + } + + VISITOR_INFO1_LIVE__k { + duration = 180 + durationUnit = days + type = cookie_http+html + provider = Google + } + + VISITOR_INFO1_LIVE__default { + duration = 180 + durationUnit = days + type = cookie_http+html + provider = Google + } + } + } +} diff --git a/Configuration/TypoScript/TrackingObjects/GoogleAnalytics.typoscript b/Configuration/TypoScript/TrackingObjects/GoogleAnalytics.typoscript index b282b847..f900336d 100644 --- a/Configuration/TypoScript/TrackingObjects/GoogleAnalytics.typoscript +++ b/Configuration/TypoScript/TrackingObjects/GoogleAnalytics.typoscript @@ -23,6 +23,91 @@ plugin.tx_cookieman.settings.trackingObjects { # ) show { # https://developers.google.com/analytics/devguides/collection/gtagjs/cookie-usage + # many are missing. See https://business.safety.google/adscookies/ + DSID { + duration = 2 + durationUnit = weeks + type = cookie_http+html + provider = Google + } + + test_cookie { + duration = 15 + durationUnit = minutes + type = cookie_http+html + provider = Google + } + + IDE { + duration = 24 + durationUnit = months + type = cookie_http+html + provider = Google + } + + FPLC { + duration = 20 + durationUnit = hours + type = cookie_http+html + provider = Google + } + + FPID { + duration = 2 + durationUnit = years + type = cookie_http+html + provider = Google + } + + GA_OPT_OUT { + duration = 7 + durationUnit = years + type = cookie_http+html + provider = Google + } + + __utma { + duration = 2 + durationUnit = years + type = cookie_http+html + provider = Google + } + + __utmb { + duration = 30 + durationUnit = minutes + type = cookie_http+html + provider = Google + } + + __utmc { + duration = + durationUnit = session + type = cookie_http+html + provider = Google + } + + __utmt { + duration = 10 + durationUnit = minutes + type = cookie_http+html + provider = Google + } + + __utmz { + duration = 6 + durationUnit = months + type = cookie_http+html + provider = Google + } + + __utmv { + duration = 2 + durationUnit = years + type = cookie_http+html + provider = Google + } + _ga { duration = 2 durationUnit = years @@ -32,15 +117,21 @@ plugin.tx_cookieman.settings.trackingObjects { _gat { duration = 1 - durationUnit = day + durationUnit = minute type = cookie_http+html provider = Google - htmlCookieRemovalPattern = ^_gat(?:_UA\-\d+\-\d+)?$ } - _gid { + _gat_--custom-name-- { duration = 1 - durationUnit = day + durationUnit = minute + type = cookie_http+html + provider = Google + } + + _gid { + duration = 24 + durationUnit = hours type = cookie_http+html provider = Google } @@ -50,15 +141,80 @@ plugin.tx_cookieman.settings.trackingObjects { durationUnit = years type = cookie_http+html provider = Google - htmlCookieRemovalPattern = ^_ga_GTM\-\d+$ + htmlCookieRemovalPattern = ^_ga_ + } + + _dc_gtm_--property-id-- { + duration = 1 + durationUnit = minute + type = cookie_http+html + provider = Google + htmlCookieRemovalPattern = ^_dc_gtm_UA\-\d+\-\d+$ + } + + _gaexp { + duration = 93 + durationUnit = days + type = cookie_http+html + provider = Google + } + + _gaexp_rc { + duration = 10 + durationUnit = seconds + type = cookie_http+html + provider = Google + } + + _opt_awcid { + duration = 24 + durationUnit = hours + type = cookie_http+html + provider = Google + } + + _opt_awmid { + duration = 24 + durationUnit = hours + type = cookie_http+html + provider = Google + } + + _opt_awgid { + duration = 24 + durationUnit = hours + type = cookie_http+html + provider = Google + } + + _opt_awkid { + duration = 24 + durationUnit = hours + type = cookie_http+html + provider = Google } + _opt_utmc { + duration = 24 + durationUnit = hours + type = cookie_http+html + provider = Google + } + + _gac_--property-id-- { - duration = 3 - durationUnit = months + duration = 90 + durationUnit = days + type = cookie_http+html + provider = Google + htmlCookieRemovalPattern = ^_gac_ + } + + AMP_TOKEN { + duration = 1 + durationUnit = year type = cookie_http+html provider = Google - htmlCookieRemovalPattern = ^_gac_UA\-\d+\-\d+$ } } } diff --git a/Configuration/TypoScript/TrackingObjects/GoogleTagManager.typoscript b/Configuration/TypoScript/TrackingObjects/GoogleTagManager.typoscript index f32e69a9..4e5a9c80 100644 --- a/Configuration/TypoScript/TrackingObjects/GoogleTagManager.typoscript +++ b/Configuration/TypoScript/TrackingObjects/GoogleTagManager.typoscript @@ -21,22 +21,10 @@ plugin.tx_cookieman.settings.trackingObjects { # ) show { # https://developers.google.com/analytics/devguides/collection/gtagjs/cookie-usage - _gcl_au { - duration = 3 - durationUnit = months - type = cookie_http+html - provider = Google - } - - AMP_TOKEN { - duration = 1 - durationUnit = year - type = cookie_http+html - provider = Google - } + # https://business.safety.google/adscookies/ _dc_gtm_--property-id-- { - duration = 2 - durationUnit = years + duration = 1 + durationUnit = minute type = cookie_http+html provider = Google htmlCookieRemovalPattern = ^_dc_gtm_UA\-\d+\-\d+$ diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index 1b4627b0..2f363d82 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -253,6 +253,12 @@ none + + second + + + seconds + minute @@ -271,6 +277,12 @@ days + + week + + + weeks + month