Site URL: https://www.delightedspirit.com
I want to prevent ActiveCampaign's site tracking if someone doesn't consent to cookies on my website. I'm following these instructions & I'm now at the last step (#4). I'd like to know if I need to change anything to make it work with Squarespace specifically?
Here's their example:
// Insert tracking snippet here
if (document.cookie.indexOf('accept_cookies') !== -1) {
vgo('process', 'allowTracking');
}
$('.btn').on('click', function() {
var expiration = new Date(new Date().getTime() + 1000 * 60 * 60 * 24 * 30);
vgo('process', 'allowTracking');
document.cookie = 'accept_cookies=1; expires=' + expiration + '; path=/';
});
I'm not even sure how to test if I did this correctly.