Skip to content

setting the cookie domain even when cookies are disabled for compatibility with "Require Cookie Consent" feature #17417

@Starker3

Description

@Starker3

Description of issue:

When using a cookie domain such as .example.com and requiring cookie consent causes cookies for both www.example.com and .example.com to be created when cookie consent is given when using MTM
However, when cookie consent is withdrawn only one set of cookies are deleted (.example.com).
The www.example.com cookies remain including the mtm_cookie_consent cookie which causes .example.com cookies to be recreated when refreshing the page.

Steps to reproduce:

  1. Setup MTM container using the following settings:
    Enable Link Tracking
    Enable Cross Domain Linking
    Require Cookie Consent
    Cookie domain set to .example.com
    Bundle Tracker
    Register As Default Tracker

  2. Visit the page and execute _paq.push(['rememberCookieConsentGiven']);

  3. Refresh the page and check cookies created (There should be cookies for both www.example.com and .example.com when reproducing - in my testing I am using a website with a different subdomain of static.example.com)
    It is expected here that cookies should only be set to .example.com
    image

  4. Execute _paq.push(['forgetCookieConsentGiven']); and refresh the page. Check cookies, there should be cookies that remained for www.example.com:
    image

  5. Refresh the page, it should have recreated the cookies for .example.com:
    image

Expected behaviour:

When not using a cookie domain and having Require Cookie Consent enabled, the Cookie Consent works as expected. It only creates cookies for the subdomain that is being viewed and the cookies are deleted when withdrawing cookie consent.

Metadata

Metadata

Labels

BugFor errors / faults / flaws / inconsistencies etc.c: PrivacyFor issues that impact or improve the privacy.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions