In this article, you’ll learn:
As part of the data protection policies, it is necessary to display a cookie banner informing visitors about cookies or obtain consent before tracking their data. This ensures that if you use tools/scripts on your website to identify individuals and their personal information, you can only do so with their consent.
To comply with data protection policies, VWO comes with an option to configure triggers for VWO Insights and Engage. This is typically helpful when you intend to track visitors data more carefully, responsibly, and with consent.
In VWO, you can configure this feature in the form of a Custom Trigger, which allows you to use any complex conditions as the trigger for the Insights and Engage data collection.
Let’s understand this better through an example.
Assume you’ve added the VWO SmartCode on your webpage conditionally. Now, whenever a visitor lands on your webpage, he/she is prompted with a cookie consent popup, which must be approved for the VWO SmartCode to execute.
This means, at first, the control version is displayed to the visitor along with the cookies consent popup, something like this:
Only after the visitor approves the consent popup, the VWO SmartCode executes, and the improvements you've made are applied. The page obviously reloads to show the variation. Say, if the webpage background in the above screenshot is blue in the variation, the visitor will first see it in white, and then blue after accepting the cookie.
The visitor will experience a flash of old content or flicker on the page. Therefore, we do not recommend executing the SmartCode conditionally on your website, instead use Triggers to avoid this experience.
How to Configure Triggers in VWO?
As of now, this option is not available in the UI, but you can contact our support team at firstname.lastname@example.org to get this option enabled for your account. You can share the custom trigger you would like to use or seek help from the Support Team to identify the custom trigger for your use case.
Once the trigger is enabled, you need not execute VWO SmartCode conditionally on your website. This means you can add VWO SmartCode to your website without any conditions.
For example, this sample code snippet will look for the respective cookie,i.e., consent_available, and once the cookie is present, it will provide the consent to track.