How to add a cookie consent pop-up to your Studio

Many people have asked how they can add a pop-up to their studio that informs end-users about cookies and asks for consent. Doing so is very simple in Pickaxe! It’s just pasting a line of code into the studio.

Here’s a step-by-step process:

  • In your Studio, click on the Settings tab.
  • Look for the Code Injection section near the bottom
  • Then paste the following code into the Footer section.

CODE TO USE

<!-- Cookie Consent by FreePrivacyPolicy.com https://www.FreePrivacyPolicy.com -->
<script type="text/javascript" src="//www.freeprivacypolicy.com/public/cookie-consent/4.1.0/cookie-consent.js"></script>
<script type="text/javascript" charset="UTF-8">
document.addEventListener('DOMContentLoaded', function () {
    cookieconsent.run({
        "notice_banner_type": "simple",
        "consent_type": "implied",
        "palette": "dark",
        "language": "en"
    });
});
</script>

That’s it! Then all end-users will receive a simple pop-up. For your convenience, here is a preview of the pop-up they will receive. You can further customize the look of it by changing the code. I suggest pasting the code into ChatGPT and having a conversation about the stylistic changes you want.

EXAMPLE SCREENSHOT

WHERE TO PASTE IT

11 Likes

A couple additions here. With the new workspace interface, you find this now in Settings > Workspace Custom Code > Body (input box).

I added this section after the closing tag to make the colors match what I’d set for the Home page palette. (Set your own hex colors and font family accordingly.)

#cookie-consent-banner { background-color: #FAFAF8 !important; color: #1a1a1a !important; font-family: 'Crimson Text', serif !important; } .cc-nb-okagree { background-color: #2A7B8C !important; color: #FAFAF8 !important; border: none !important; } .cc-nb-changep { background-color: transparent !important; color: #2A7B8C !important; border: 1px solid #2A7B8C !important; }

(Sorry - it lost the alignment in pasting, but you’ll figure it out.)

1 Like