In this article, you’ll learn:
Concept of Triggers for tracking data with visitor consent
Before you proceed any further, we recommend you familiarise yourself with the Cookie Consent and Wingify’s Adherence.
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, Wingify comes with an option to configure triggers for Wingify Insights and Engage. This is typically helpful when you intend to track visitors data more carefully, responsibly, and with consent.
In Wingify, 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.
NOTE: This configuration controls all the features of Insights and Engage.
Let’s understand this better through an example.
Assume you’ve added the Wingify 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 Wingify 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 Wingify 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.
Configure Triggers in Wingify
As of now, this option is not available in the UI, but you can contact our support team at support@wingify.com 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 Wingify SmartCode conditionally on your website. This means you can add Wingify 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.
function() {
var timer = setInterval(function() {
if (document.cookie.indexOf("consent_available") >= 0) {
executeTrigger();
clearInterval(timer);
}
}, 100)
}NOTE: Ensure that the strategy chosen to decide whether consent has been given should be written in a way that, even if Wingify Library executes after the consent has been given, the custom trigger code could determine whether the consent has already been provided or not. Since a visitor can give consent once and then continue browsing the website, the Wingify Library needs to know if it can continue tracking every page visit or not.