Settings related to the Cookie Consent Manager
If your website uses a Cookie Consent Manager, please note the following things
If the website on which ABlyft is used has a Cookie Consent Manager, it is important to make the appropriate settings in both platforms.
If no settings are made, the Cookie Consent Manager may delete cookies it does not recognize. This can lead to problems in the measurement of data in ABlyft.
If you consider to run ABlyft in the "essential" or "functional" scope, it could be sufficient to only work on the step Setup in the Consent Manager Platform.
On this page
Two different approaches
One approach is to only load ABlyft (the base script) if consent is given.
In most cases, however, this will lead to a flickering effect. This is at least the case for the user's initial page request, but also for all page requests, depending on the implementation.
For this approach you have to go through the "Setup in the Consent Manager Platform > Add cookies/storage entries".
The better approach is to always directly implement ABlyft (the base script in the website / head section) and tell ABlyft whether cookies may be set or not.
This has a great advantage in terms of performance.
For this approach you have to go through both setup steps.
Setup in the Consent Manager Platform
Two things need to be done in the Consent Manger platform.
Add cookies/storage entries
All cookies (and things set in the localStorage and sessionStorage) has to be registered in the desired scope (i.e. "Marketing").
This is all keys, that are mentioned on the page Cookies and localStorage.
Basically you can add everything beginning with ablyft_
Add Code to Callbacks / Opt-In and Opt-Out Code
The vast majority of Consent Manager Platforms have the option of executing JavaScript code when accepting and rejecting cookies.
The following code must then be executed there accordingly:
when consent is given (cookies/scope accepted)
window['ablyft'] = window['ablyft'] || [];
window['ablyft'].push({
eventType: 'enableTrackingConsent'
});
when consent is declined (cookies/scope rejected)
This is optional, but could be used to prevent ABlyft from running again generally.
window['ablyft'] = window['ablyft'] || [];
window['ablyft'].push({
eventType: 'disableTrackingConsent'
});
Setup in ABlyft
In ABlyft you then have to edit the "Project Prerequisites". You find those under "Project" on the left hand side navigation.
Enter the following code there:
Rules - General Startup (Run Variations)
This is optional, but could be used to prevent ABlyft from running again generally.
if(ablyft.get('trackingConsentEnabled') !== false){
return true;
}
Rules - Tracking and Browser Storage
return ablyft.get('trackingConsentEnabled');