Jump to content

Cookies & ActiveCampaign GDPR compliance

Recommended Posts

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.

Link to comment
  • expand.shine changed the title to Cookies & ActiveCampaign GDPR compliance
2 hours ago, expand.shine said:

I'd like to know if I need to change anything to make it work with Squarespace specifically?

To answer your specific question, it would typically require ".sqs-cookie-banner-v2-accept" instead of ".btn" as shown in your question.

 

However, it's worth me pointing out a couple of other things:

1. You're currently using jQuery version 3.3.1 - an old version that has known security vulnerabilities. (read "bad"). It would be best to change this to 3.6.0. For example:

<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK" crossorigin="anonymous"></script>

2. Your Squarespace cookie banner only has the 'agree' option shown. For compliance in the EU, you would need to also show the 'disagree' option (it's available in the Squarespace settings).

 

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
18 hours ago, expand.shine said:

What are the integrity & crossorigin elements of the jquery script?

Good question! They are there to protect your visitors and therefore your site.

Whenever you add a script to your site from somewhere else (in this case jquery.com), it's good security practice to check that the file is genuine and hasn't been manipulated or changed by someone else.  The integrity attribute allows the browser to integrity check the file. If it doesn't pass this check, it won't be loaded, and your visitors won't be harmed. The crossorigin attribute must be present for the integrity check (above) to be performed.

I hope this helps. 😀

  If this post has helped you, please click a 'Like' or 'Thanks' icon below  ⬇️

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.