Duration of consents conservation
You want to change the duration of consents conservation

1. Introduction

The solution is set to save consents for a 11 months duration. You can save all your consents and find your consents register simply by checking the box "Save consent proof in axeptio's audit trail"
We'll save consents in a cookie located in the explorer local Storage.
At the end of the 11 months the consent will automatically be asked again by making the cookie expire, which will display the widget again.

2. The widget is always displayed on your website

Then the choices will be kept on your site for 11 months, after what they will be automatically reinitialized.
In that case, once the user gave his consent, then the widget will disappear for 11 months. If you want the widget to appear again after 6 months, here is how :
When integrating the code, add this code at the same place as the SDK :
1
var nbOfDaysToWaitBeforeAskingAgain = 30 * 6;window._axcb = window._axcb || [];
2
window._axcb.push(function(sdk) {
3
try {
4
var json = sdk.userPreferencesManager.readChoicesFromCookies(
5
"axeptio_cookies"
6
);
7
if (json && json.$date) {
8
var acceptedAt = new Date(json.$date);
9
var now = new Date();
10
if (
11
(now.getTime() - acceptedAt.getTime()) / (1000 * 60 * 60) >
12
nbOfDaysToWaitBeforeAskingAgain
13
) {
14
window.openAxeptioCookies();
15
}
16
}
17
} catch (err) {
18
console.error('Axeptio could not read previous choices nor parse consent date', err);
19
}
20
});
Copied!
Last modified 8mo ago