Advice and answers from the Seidat Team

Emma Ojapuska
Written by Emma Ojapuska

Setting up Google Analytics in Google Tag Manager

How to make Google Analytics in Google Tag Manager work in Seidat

Due to a recent security-related change (as of April 2021), Chrome-based browsers no longer allow third-party iframes to freely access cookies. This impacts Google Analytics (GA) added through Google Tag Manager (GTM), as our GTM for teams implementation is sandboxed inside an iframe (a child page embedded in Seidat). Teams not using GTM are not affected.

To make GA through GTM work consistently, a custom field needs to be added to your “Google Analytics settings” variable in GTM. The setting is named differently depending on your version of Google Analytics, and adding it tweaks the cookie configuration to make the cookie accessible in iframes.

  • In Google Universal Analytics (old GA): cookieFlags: samesite=none;secure
  • In Google Analytics 4 (new GA): cookie_flags: samesite=none;secure

You can find further technical details on the cookie flags and security changes here: