Analytics & cookie consent
Connect analytics and marketing tools to see how visitors use your site, and ask for cookie consent first.
Connect the analytics and marketing tools you already use, like Google Analytics or Meta Pixel, and they're added to every page of your site. Turn on the cookie consent banner and they wait until visitors agree.
Every site also has SleekSite Analytics built in: visitors, traffic sources and conversions, with no cookies and nothing to set up. See them under Analytics in the left menu, and read Analytics for what it shows.
SleekSite Analytics#
The SleekSite Analytics switch at the top of this screen is on for every site. Turn it off to stop recording visits and conversions straight away; the tracker comes off your pages with your next publish, and what was already recorded is kept. See Privacy, data & plans.
SleekSite Analytics uses no cookies, so the cookie consent banner doesn't hold it back. The providers below are separate, and you can use them alongside it.
Adding a provider#
- Consent banner: tags wait until the visitor accepts
- Paste the ID, or the provider's whole snippet, then Save
- Step-by-step guide to finding your ID
- Add another provider
Add one in four steps:
- Choose a provider under Add an integration
- Paste its ID, like
G-AB12CD34EFfor Google Analytics. Not sure which part is the ID? Paste the provider's whole snippet and SleekSite pulls the ID out. Each provider has a Where do I find… guide - Click Save
- Publish your site. Tags go live with your next publish
To remove a provider, click its trash icon, then publish.
| Provider | What it's for |
|---|---|
| Google Analytics 4 | Page views, visitors and where they come from |
| Google Tag Manager | Managing many tags from one place in Google |
| Meta Pixel | Measuring your Facebook and Instagram ads |
| Google Ads | Measuring conversions from your Google ads |
| Google Search Console | Verifying with Google that you own the site. It isn't analytics: it adds no script and no cookies |
| PostHog | Product analytics: how visitors move through your site |
| Other | Any other tool, like a heatmap or a chat widget. See Other tools |
Cookie consent banner#
Turn on Cookie consent banner and publish, and visitors see a banner asking for their consent. Your analytics tags don't load until they accept.
- Accept all, or Decline
- Settings: choose which categories to allow
- Necessary: always on
- One category for each kind of tag on your site, listed automatically
- Save choices
- Built-in providers are in the Analytics category, and are held until the visitor accepts it. Search Console is never held, because it adds no script or cookies
- Your own tags can use any category, like Marketing for ad pixels. The banner lists each category your site uses automatically
- Necessary covers what the site needs to work, and is always on
Letting visitors change their choice#
Add a Cookie settings link, usually in your footer, so visitors can change their mind later. Any link or button with a data-sleekcms-consent attribute reopens the cookie preferences:
<button type="button" data-sleekcms-consent>Cookie settings</button>
Or ask the AI Assistant: "Add a Cookie settings link to the footer that reopens the cookie preferences."
Changing how the banner looks#
You can change the banner's position, colours, wording and language, and link it to your privacy policy. Ask the AI Assistant, like "Move the cookie banner to the bottom right, match our brand colours and link it to /privacy", or see Cookie consent in the template reference.
Other tools#
For a tool that isn't in the list, the easiest way is to ask the AI Assistant and paste the snippet your provider gave you: "Add this Hotjar tracking code to every page, and hold it until visitors accept analytics cookies."
Developers can add it to a view themselves, usually the layout template that wraps every page, just above </head>. Mark each tag with data-sleekcms-consent="<category>":
<script async src="https://example.com/tag.js" data-sleekcms-consent="analytics"></script>
<script data-sleekcms-consent="analytics">
window.exampleTag = window.exampleTag || [];
exampleTag.push(['init', 'YOUR-ID']);
</script>
</head>
- When your site builds, anything marked this way is switched off. Once the visitor accepts that category, it's switched back on
- Use
analyticsfor analytics tools andmarketingfor ad and remarketing pixels. The banner lists each category automatically - Leave the attribute out for scripts that must always run
- Choosing Other in the provider list shows these steps, with a button that opens the layout template in Site Builder