Special cases SPA or React
SPAs don't reload the page so if the user wants to modify or withdraw his consent, then the scripts won't be modified.
The script deposit is conditionned by the trigger of an event after the user clicked on a cookie in the Axpetio widget. Every cookies will then be deposited according to user choices on the widget.
However if the user comes back to modify his choice then this change will not be effective until the next loading of the page, which is in inadequate with the functioning principles.
To fix this problem, you can reload the page after the user choice. Here is how :
1
(_axcb = window._axcb || []).push(function(sdk) {
2
sdk.on('consent:saved', function(choices) {
3
window.location.reload()
4
});
5
});
Copied!
Last modified 7mo ago
Copy link