Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMSCookieLevel cookie not added when accepting consent under certain circumstances #46

Open
kentico-matthews opened this issue May 6, 2024 · 1 comment

Comments

@kentico-matthews
Copy link
Contributor

Brief bug description

When a new visitor uses the cookie consent banner to agree to the highest level of tracking, or navigates to the cookie configuration page and accepts the Marketing cookie level, the CMSCookieLevel cookie does not appear.

As a result, the contents of the consent-based page builder section that relies on CMSCookieLevel do not display for such users.

Repro steps

  1. In a new incognito window, navigate to the home page of the site
  2. Click on the "Accept all cookies" button in the cookie consent banner
  3. Navigate to the contact us page
  4. Nothing is displayed because the conditional page builder section does not realize that the visitor has consented to tracking.

Expected behavior

The content should be displayed for visitors who have consented to tracking

Additional context

The point of failure seems to be SetCookieLevelIfChanged. From debugging, it seems that the cookie level returned by GetCurrentCookieLevel is always 1000, even when no cookie is present, thanks to the "Default cookie level" setting for the website channel. Please adjust the value of this channel setting in the CI data for the repository.

@kentico-matthews
Copy link
Contributor Author

These changes should fix the issue

dominikag2 pushed a commit that referenced this issue May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant