In this article, you’ll learn the following: |
Overview
Tracking visitors is crucial for enhancing their experience on your website. However, it's purely dependent on visitors’ consent. VWO honors this effort by providing the facility to align with your cookie consent settings.
By nature,
-
VWO tracks conversions and visitor behavior when the visitor understands the need for tracking and provides consent.
- VWO does not track conversions and visitor behavior when the visitor declines to consent.
However, not all visitors respond to the tracking request. Sometimes, they ignore it and continue. In such cases, you can configure VWO SmartCode to enable, disable, or partially enable tracking as suited to your business requirement.
For example, if your tracking request banner features a notification that proceeding further into the website would be deemed an acceptance, then you can configure VWO SmartCode's behaviour to align with your tracking criteria when consent is pending.
NOTE: A visitor's consent status is considered ‘pending’ from the moment they land on the page until they provide a response.
Where to Access the Feature?
To configure the tracking behaviour of VWO when the tracking request is kept pending, perform the following steps:
- On the main menu, go to Configurations > Websites and Apps > select your website.
- Under the Code tab, you’ll find your VWO SmartCode in HTML mode.
- Click on the gear icon (⚙) at the top-right corner of the SmartCode to access the Customize SmartCode section, which features several options to customize the SmartCode.
- Select the Handle Cookie Consent option.
- Under Manage VWO’s functionality when cookie consent is pending, select an appropriate option from the dropdown:
PREREQUISITE: The cookie consent manager added to your website should be updated to whitelist the first-party cookies mentioned here.
Action | VWO’s Tracking Behaviour |
Completely Block VWO |
While consent is pending: SmartCode won’t function. NOTE: If cookie consent detection times out and cookie consent for VWO is provided afterwards, testing campaigns will work from the next visit to ensure a good UX, while insights campaign tracking will work from the same visit. |
When the visitor provides consent: SmartCode will start working | |
When the visitor declines the tracking request: SmartCode won’t function, and thereby,
|
|
Partially Block VWO NOTE: This option will not be available for accounts with Insights-only campaigns. |
While consent is pending: SmartCode functions partially as follows:
|
When the visitor provides consent:
|
|
When the visitor declines the tracking request:
|
|
Do not Block VWO | While consent is pending: SmartCode works as usual |
When the visitor provides consent: SmartCode continues working | |
When the visitor declines the tracking request:
|
Things to Remember
- If a visitor initially declines the tracking request but accepts it later, VWO will only start functioning from their next visit. Any actions performed during the period when tracking was declined will not be tracked, and no campaigns will run during that time.
- Campaign live preview respects cookie consent settings, showing messages accordingly:
- "Cookie consent rejected" when consent is rejected.
- "Waiting for cookie consent" when completely blocked and consent is pending.
- "Cookie consent rejected" when consent is rejected.
- Your campaign’s direct preview link will ignore the cookie consent configurations.
- When a VWO campaign spans multiple domains/subdomains, its functionality based on cookie consent depends on the specific configurations set for each. Therefore, if you need to implement a cookie consent popup in a domain/subdomain where you’re running VWO campaigns, you should register each domain/subdomain individually in VWO.
- Whitelist the cookies listed here in the cookie consent manager, with priority on _vwo_consent. This cookie records visitor consent for VWO, setting 1 for consent and 0 for denial, determining if VWO can operate. When "Partially Block VWO" is selected and consent is pending, essential tracking data is stored temporarily to ensure tracking accuracy upon consent approval.
How to Enable VWO to Detect the Cookie Consent Status?
To ensure VWO respects a visitor’s cookie consent preferences, you need to include the following code snippet in your website’s source code at the relevant points where consent-based functionality is configured.
While applying the code, replace <number-value> with the corresponding value based on the visitor's consent status:
- 1 for Accepted
- 2 for Pending
- 3 for Rejected
To enable VWO to detect an acceptance, then the code should be modified as follows:
Similarly, to enable VWO to detect a rejection, the code should be modified as follows:
Options for ‘Completely Block VWO’
By default, the Completely Block VWO option is applied to your VWO SmartCode, which will also entail the following options:
Cookie Consent Detection Timeout
When a visitor arrives on your webpage and hasn't responded to the cookie consent prompt, they will be served the original web page content. You can configure a timeout duration for VWO to apply the appropriate variation based on the visitor’s response.
By default, the value is configured to 2000 ms. If the visitor does not consent within this set threshold, VWO will not apply any campaign changes, ensuring a consistent and uninterrupted user experience (UX).
Enable Blurry Background
If your campaign involves visual changes, you can opt to blur the webpage content until they respond to the tracking request. To implement this, select this option and specify the CSS selector for the cookie consent popup. This ensures that only the content of the webpage is blurred, keeping the consent popup visible.
This feature ensures that VWO can apply the appropriate content variation after the visitor’s consent for tracking while preventing any flash of original content.
The blurred background will be removed immediately upon detecting the visitor's cookie consent response, whether accepted or rejected or when the cookie consent detection timeout period expires.