Free Tool
Cookie Notice Banner
Create a free, dismissible notice with your message and privacy policy link. Customize its colors and position. This code does not block tracking scripts or collect cookie consent.
Start with Squarespace’s native controls
Squarespace has a built-in cookie banner with decline and preference controls. Use it when you need visitors to choose which cookies to allow. This generator adds only a separate notice. It does not replace those controls or certify compliance. Read Squarespace’s banner guide.
Customize
Layout
Colors
Behavior
Live Preview
Generated Code
The code is free. Replace the sample policy URL with your own before installing. Dismissing this notice does not accept cookies.
<!-- Dismissible cookie notice. Does not block scripts or record tracking consent. -->
<style>
#sqt-cookie-notice{box-sizing:border-box;position:fixed;bottom:0;left:0;right:0;padding:18px 32px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;background:#1a1a1a;color:#e0e0e0;font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;z-index:99999}
#sqt-cookie-notice .sqt-notice-message{white-space:pre-wrap;overflow-wrap:anywhere}
#sqt-cookie-notice .sqt-notice-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;}
#sqt-cookie-notice button{padding:10px 24px;background:#ffffff;color:#000000;border:0;border-radius:4px;font-family:inherit;font-size:14px;font-weight:500;line-height:1.5;cursor:pointer}
#sqt-cookie-notice a{color:#e0e0e0;text-decoration:underline}
#sqt-cookie-notice :is(button,a):focus-visible{outline:2px solid currentColor;outline-offset:3px}
</style>
<script>
(function(){
var options={"message":"Read our privacy policy for details about cookies and data use.","dismiss":"Got it","link":"Privacy policy","url":"/privacy-policy","remember":true};
var storageKey='sqt-cookie-notice-dismissed';
function mount(){
if(document.getElementById('sqt-cookie-notice'))return;
if(options.remember){try{if(localStorage.getItem(storageKey)==='yes')return;}catch(error){}}
var banner=document.createElement('div');
banner.id='sqt-cookie-notice';
banner.setAttribute('role','region');
banner.setAttribute('aria-label','Cookie notice');
var message=document.createElement('span');
message.className='sqt-notice-message';
message.textContent=options.message;
var actions=document.createElement('div');
actions.className='sqt-notice-actions';
var button=document.createElement('button');
button.type='button';
button.textContent=options.dismiss;
var link=document.createElement('a');
link.href=options.url;
link.textContent=options.link;
actions.appendChild(button);
actions.appendChild(link);
banner.appendChild(message);
banner.appendChild(actions);
button.addEventListener('click',function(){
if(options.remember){try{localStorage.setItem(storageKey,'yes');}catch(error){}}
banner.remove();
});
document.body.appendChild(banner);
}
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',mount,{once:true});
else mount();
})();
</script>How to add this to Squarespace
- Go to Code Injection panel
- Paste the generated code into the Footer section.
- Click Save and refresh your site.
- The banner will appear on every page. Once dismissed, it stays hidden in this browser while its saved dismissal remains.
- Keep your existing cookie consent controls. This notice does not change script loading or cookie permissions.
Choose the right cookie banner for your Squarespace site
Updated October 23, 2026.
For cookie preferences, start in Squarespace
Open Cookies & Data Privacy, enable the cookie banner, and review its Decline all and Manage cookies options. Check the non-essential cookie settings and save. Its style controls let you change the banner’s appearance.
Squarespace’s banner can restrict its own cookies and some connected integrations. Custom tracking scripts may need their own integration with the visitor’s choices. Adding this notice does not make that connection.
Squarespace’s cookie-banner instructions · Custom code and cookie preferences
For an additional notice, use this free generator
The export shows plain text, a privacy-policy link, and a dismiss button. When enabled, browser storage remembers only that the notice was dismissed. It does not grant consent, block analytics, scan cookies, manage categories, or maintain consent records. Avoid adding a second banner that conflicts with an existing consent manager.
Install and inspect the notice
Code Injection requires Core, Plus, Advanced, or an eligible legacy Squarespace plan. Confirm that the panel is available in your account before using this export.
- Replace the sample message and privacy-policy address. Use a local path beginning with / or a full HTTPS URL.
- Back up existing code. Add this snippet to the Footer field of the Code Injection panel and save.
- Open the public site, follow the policy link, and dismiss the notice. Check a narrow screen and keyboard navigation.
- If remembering is enabled, reload to check the saved dismissal. With storage unavailable, the notice can still close but may return on the next page.
- Remove this snippet to remove the notice. Keep the site’s actual consent controls configured separately.
Cookie notice questions
Does Squarespace have a built-in cookie banner?
Yes. Squarespace provides a native banner with decline and preference options. Start there when you need visitors to manage cookie choices.
Does this exported notice block tracking or collect consent?
No. It displays your message and policy link, then closes when dismissed. It does not change tracking scripts, cookie permissions, or consent-manager settings.
Does this generator guarantee GDPR or CCPA compliance?
No. A dismissible notice does not establish legal compliance. This export does not provide script blocking, consent records, or a privacy policy.
What does the browser remember?
When enabled, a separate localStorage value remembers only dismissal of this notice. Clearing site data removes it. If storage is unavailable, the notice still works but may return on another page.
Where do I install the code?
Use the Footer field in Squarespace’s Code Injection panel on a plan that supports it. Replace the sample policy URL and check the public result. The notice does not replace your site’s actual cookie controls.
Is the notice generator free?
Yes. The preview and generated code are free. Your Squarespace subscription is separate. There is no compliance certification or managed consent service included.
Need a hand with your site?
Get help installing, styling, or troubleshooting your changes.
