瀏覽代碼

feat: support new Google Analytics cookie requirements

Firefox console notice: Cookie “_ga” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute.
George Cushen 4 年之前
父節點
當前提交
95e128c8dc
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      wowchemy/layouts/partials/marketing/google_analytics.html

+ 1 - 0
wowchemy/layouts/partials/marketing/google_analytics.html

@@ -34,6 +34,7 @@
 
   gtag('js', new Date());
   gtag('config', '{{$ga}}', {{$gtag_config|safeJS}});
+  gtag('set', {'cookie_flags': 'SameSite=None;Secure'});
 
   // Outbound link tracking.
   document.addEventListener('click', onClickCallback, false);