Integrations
Inline privacy settings embed
Put cookie preference controls directly into your privacy or cookie policy page
Available on the Pro plan and above. See pricing for what each plan includes.
The inline embed puts cookie preference controls directly into a page on your site, usually your privacy or cookie policy page. It is plain HTML, with no iframe and no popup, so it takes on your site's fonts, colours and button styles.
Before you start
- You need the Pro plan or higher.
- Install the consent banner on your site first. The inline embed is an extra place for visitors to review their choices. It does not replace the banner.
Step 1: Configure the embed
- In the dashboard, open your domain and go to Cookie declaration. In the sidebar, open Inline Cookie Settings.
- Make sure the embed is enabled.
- Use the tabs to set it up:
- Visual: CSS class names for each part of the widget, animations and category icons.
- Categories: the categories visitors can turn on and off, with their names and descriptions.
- Accessibility: settings for keyboard and screen-reader use.
- Preview: check the result before you publish.
- Save your changes.
Step 2: Publish
Click Publish. The widget on your site always loads the published version. Until you publish, it shows the default categories instead of yours. Republish after every change you want visitors to see.
Step 3: Install the code
Open the Install Code tab and copy both snippets. The HTML snippet marks where the controls appear:
<div id="cmp-settings-embed"></div>The script snippet loads the widget for your domain and tells it where to load your settings and send consent records:
<script>
window.CMP_EMBED_CONFIG_ENDPOINT = 'https://getcookies.co/api/v1/public/embed-config';
window.CMP_API_ENDPOINT = 'https://getcookies.co/api/v1/public/consent';
</script>
<script src="https://getcookies.co/static/inline-settings-embed.js?domain_id=YOUR_DOMAIN_ID" async></script>Copy the snippets from the dashboard rather than from this page. The dashboard fills in your own domain ID and the right addresses.
- Paste the HTML snippet where the controls should appear.
- Paste the script snippet on the same page, before the closing
</body>tag. - Keep the
id="cmp-settings-embed"attribute exactly as it is. The widget looks for that element and does nothing if it is missing.
What visitors can do
- Turn each optional category on or off. Strictly necessary cookies are always on.
- Save their choice. It is stored in their browser, and the record appears in your consent log.
When a visitor saves, the page receives a cmp:consent-updated event on window, which your own code can listen for.
The inline embed keeps its own record of the visitor's choice. To let visitors change what the consent banner enforces, add a button that calls window.GetCookies.show() to reopen the banner, or connect your own controls with window.GetCookies.updateConsent(). See Use the JavaScript API.
Styling
The widget uses your site's CSS by default. To fit it into your design system, add your own class names on the Visual tab. You can also set them in code before the script loads:
<script>
window.CMP_CUSTOM_CLASSES = {
saveButton: 'btn btn-primary',
toggleInput: 'form-check-input'
};
</script>Troubleshooting
- Nothing appears. Check that the page has an element with
id="cmp-settings-embed"and that the script loads (DevTools → Network). - The default categories show instead of yours. Publish the configuration and make sure the embed is enabled. Check that the script
srcstill contains?domain_id=and that the two endpoint lines are on the page. The browser console logs the reason. - Blocked by your Content Security Policy. Allow the GetCookies domain in
script-srcandconnect-src. See Content Security Policy (CSP) errors. - Changes don't show. The widget caches your settings in the visitor's browser for up to an hour. Test in a private window after you publish.
Still stuck?
Email [email protected] with your domain and what you tried. Signed-in customers can also open a ticket from the dashboard.