使用SameSite和Secure属性设置Google跟踪代码管理器Cookie [英] Setting Google Tag Manager cookies with SameSite and Secure attributes

查看:513
本文介绍了使用SameSite和Secure属性设置Google跟踪代码管理器Cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Chrome正在报告以下警告:

Chrome is reporting the following warning:

https://www.googletagmanager.com/上的跨站点资源关联的cookie是没有SameSite属性的情况下设置.如果将来的Chrome浏览器版本将Cookie设置为SameSite=NoneSecure,则仅会发送带有跨站点请求的cookie.您可以在应用程序">存储">"Cookies"下的开发人员工具中查看Cookie,并在 https://www.chromestatus中查看更多详细信息.com/feature/5088147346030592 https://www.chromestatus.com/feature/5633521622188032 .

A cookie associated with a cross-site resource at https://www.googletagmanager.com/ was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.

我有两个此类警告.我看到的三个Cookie是gtm_authgtm_previewgtm_debug.所有会话cookie.我看到gtm_auth设置了Secure属性(SameSite属性为空).另外两个cookie没有设置任何一个属性.

I have two warnings of this type. The three cookies I see are gtm_auth, gtm_preview, and gtm_debug. All session cookies. I see gtm_auth is set with Secure attribute (SameSite attribute is empty). The other two cookies do not have either attribute set.

顺便说一句,它们被分类为分析性cookie,而不是市场营销cookie.

They are classified as analytical cookies, not marketing cookies, by the way.

使用Google Tag Manager,如何设置或修改这些Cookie?我不希望在我的代码中更新cookie.我想使用Google Tag Manager添加cookie属性应该是可行的. Google如何使用Google AnalyticsGoogle Tag Manager解决此问题的立场是什么?

Using Google Tag Manager, how do I set or modify these cookies? I'm not looking to update the cookies in my code. I imagine adding cookie attributes should be doable using Google Tag Manager. What is Google's stance on how to address this with Google Analytics and Google Tag Manager?

推荐答案

对于上述任何警告,如果您不负责域,则不负责更新cookie. Google跟踪代码管理器小组将负责更新相关代码,该代码为googletagmanager.com中的cookie设置SameSite属性.

For any of these warnings, if you are not responsible for the domain then you are not responsible for updating the cookies. The Google Tag Manager team will be responsible for updating the relevant code that sets the SameSite attributes for cookies from googletagmanager.com.

在这一点上,警告仅是参考性的,并不影响功能.直到M80(目前定位于2020年2月)之前,才计划在稳定的Chrome中实施此行为.

At this point, the warnings are purely informational and are not impacting functionality. Enforcing this behaviour in stable Chrome is not scheduled until M80, currently targeted for Feb 2020.

这篇关于使用SameSite和Secure属性设置Google跟踪代码管理器Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆