Migrate from Cookiebot to OptinStack
By OptinStack Team - Jul 1, 2026 - 2 min read
Use this guide if your GTM container currently uses the Cookiebot CMP template, Cookiebot consent categories, or the cookie_consent_update trigger.
Do not leave Cookiebot CMP and OptinStack both setting consent in the same GTM container. Pick one consent authority before publishing.
| Cookiebot setup | OptinStack setup |
|---|---|
| Cookiebot CMP template with Domain Group ID | OptinStack GTM template with your OptinStack Site ID only if runtime injection is needed |
cookie_consent_update custom event | optinstack_consent_updated for every edit, or category-specific accepted events for first grant, including optinstack_necessary_accepted |
| statistics category | analytics category and analytics_storage |
| marketing category | marketing category plus ad_storage, ad_user_data, and ad_personalization |
| preferences category | preferences category plus functionality_storage and personalization_storage |
| necessary category | necessary category and security_storage, always granted |
Before you start
- Export your GTM container or take screenshots of the current CMP tag, consent triggers, and affected tags.
- List every GTM tag that sets analytics, marketing, or preferences trackers. Do not rely on the old CMP category names alone.
- Decide whether your Google tags should use Basic or Advanced Consent Mode before changing triggers.
- Keep one CMP active at a time. Running the old CMP and OptinStack together can create conflicting consent defaults and updates.
Replace the CMP setup
- Remove the Cookiebot GTM template, CMP script tag, or Custom HTML tag from the live container after you are ready to test OptinStack.
- Import the official downloadable OptinStack template under Templates > Tag Templates > New > Import. It is not currently published in the Community Template Gallery. Fire the OptinStack tag on Consent Initialization – All Pages.
- Install the OptinStack runtime as early as possible in the page head so direct scripts and iframes can be blocked before they run.
- Add the OptinStack GTM template and fire it on Consent Initialization - All Pages.
- Replace old CMP custom event triggers with OptinStack category events and GTM Additional Consent Checks.
Update tag consent settings
| Tag type | Trigger | Additional consent checks |
|---|---|---|
| Non-Google analytics tag | Custom Event: optinstack_analytics_accepted | analytics_storage |
| Marketing pixel or ad tag | Custom Event: optinstack_marketing_accepted, or your conversion trigger plus consent checks | ad_storage, ad_user_data, ad_personalization |
| Preferences, personalization, or A/B testing tag | Custom Event: optinstack_preferences_accepted | functionality_storage and/or personalization_storage |
| Tag that must respond to every consent edit | Custom Event: optinstack_consent_updated | The consent types required by that tag |
| Strictly necessary tag | Custom Event: optinstack_necessary_accepted, or normal page triggers when no consent gate is needed | security_storage |
A tag with only an All Pages trigger may miss its chance to fire on the first page after consent. Pair consent-gated tags with the relevant OptinStack custom event trigger. The necessary event exists too, but necessary is always granted and is usually not used to gate optional trackers.
Test before publishing
- Use GTM Preview and confirm the OptinStack consent tag fires on Consent Initialization before other tags.
- Reject all optional categories and confirm analytics, marketing, and preferences tags stay blocked.
- Accept one category at a time and confirm only the matching tags fire.
- Use Tag Assistant to confirm Google Consent Mode defaults and updates.
- Use DevTools Network and Cookies to confirm trackers are not sending requests or writing storage before consent.
- Run an OptinStack scan after publishing to catch hard-coded trackers that GTM cannot control.
Related articles
Migrating to OptinStack from another CMP
A migration hub for moving from Cookiebot, CookieYes, OneTrust, Axeptio, or another CMP to OptinStack without breaking GTM.
Integrate OptinStack with Google Tag Manager
Configure OptinStack with Google Tag Manager from start to finish, including the GTM template, Consent Mode v2 signals, defaults, triggers, consent settings, and testing.
Set up Google Consent Mode v2
Map OptinStack's four consent categories onto Google Consent Mode v2 and keep them in sync as visitors choose.
Install OptinStack on your site
Add the OptinStack script tag, load it without slowing your page, and confirm the consent banner renders.
Block trackers before they load
How OptinStack blocks trackers before they load, how scripts are tagged to consent categories, and how to allowlist essential scripts.
How helpful was this article?