使用javascript禁用第三方Cookie [英] disable third party cookies using javascript

查看:200
本文介绍了使用javascript禁用第三方Cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在根据数据保护规则为所有在欧盟运营的公司实施新的Cookie政策合规性. 根据哪个用户在使用任何网站时必须能够拒绝/接受所有非必需的cookie. 在我客户的网站上,我可以看到正在存储以下第三方Cookie.

  • _ga-我的网站
  • _gid-我的网站
  • __ ncuid-.doubleclick.net
  • DSID-.doubleclick.net
  • IDE-.doubleclick.net
  • 1P_JAR-.google.be
  • NID-.google.be
  • 同意-.google.be
  • NID-.google.com
  • AID-.google.com
  • 同意-.google.com
  • 1P_JAR-.google.com
  • DV-www.google.be
  • OTZ-www.google.com
  • 语言环境-我的网站
  • anonymousUserId-我的网站
  • SESSID -我的网站
  • JSESSIONID-我的网站
  • TS01c70fa1-我的网站

在上述列表中,一些Cookie是由Google跟踪代码管理器发起的Google Analytics(分析)Cookie.我已经处理好了. 但是所有域为"google"和".doubleclick.net"的cookie都无法控制吗?而且我不明白它们是如何存储的.

有人可以帮助我,或者建议我是否有必要在用户同意下使用javascript禁用这些cookie? 谢谢你.

解决方案

与其阻止正在设置的cookie,否则要等到用户同意cookie策略后,才更容易加载GTM脚本.

>

i am working to implement the new cookie policy compliance as per data protection rules for all companies operating in the EU. According to which user has to be able to refuse/accept all but required cookies when he is using any website. In my client's website i can see the following third party cookies are getting stored.

  • _ga - my-site
  • _gid - my-site
  • __ncuid - .doubleclick.net
  • DSID - .doubleclick.net
  • IDE - .doubleclick.net
  • 1P_JAR - .google.be
  • NID - .google.be
  • CONSENT -.google.be
  • NID - .google.com
  • AID - .google.com
  • CONSENT - .google.com
  • 1P_JAR - .google.com
  • DV - www.google.be
  • OTZ - www.google.com
  • locale - my-site
  • anonymousUserId - my-site
  • SESSID - my-site
  • JSESSIONID - my-site
  • TS01c70fa1 - my-site

in the above mentioned list few cookies are google analytics cookies intiated by google tag manager. I have handled them. but all the cookies with domain 'google' and '.doubleclick.net' i have no control over them? and i am not able to understand how are they getting stored.

can anyone help me, or suggest me if there is anyway to disable these cookies on user consent using javascript? Thanks in advanced.

解决方案

Instead of blocking cookies that are being/were set, it's easier to not load i.e. the GTM script until after the user has consented to the cookie policy.

这篇关于使用javascript禁用第三方Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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