# Migrate from CookieYes to OptinStack

> Move a CookieYes GTM setup to OptinStack by replacing the CMP template, consent cookie conditions, and trigger wiring.

Author: OptinStack Team  
Published: 2026-07-01  
Page: https://community.optinstack.com/articles/migrate-from-cookieyes-to-optinstack  
Markdown: https://community.optinstack.com/llms.md/articles/migrate-from-cookieyes-to-optinstack

Use this guide if your GTM container currently uses the CookieYes CMP template, the cookie\_consent\_update event, or cookieyes\-consent cookie conditions such as analytics:yes\.

> **Warning:** CookieYes and OptinStack use different GTM wiring. Remove CookieYes-specific triggers and cookie conditions before relying on OptinStack events.

*CookieYes to OptinStack mapping*

| CookieYes setup | OptinStack setup |
| --- | --- |
| CookieYes CMP template with Website Key | OptinStack GTM template on Consent Initialization - All Pages |
| Support GCM and Allow Google tags to fire before consent | OptinStack Google Consent Mode setup plus your Basic vs Advanced mode decision |
| cookie_consent_update custom event | optinstack_consent_updated or category-specific accepted events, including optinstack_necessary_accepted |
| cookieyes-consent cookie with analytics:yes | optinstack_analytics_accepted plus analytics_storage |
| cookieyes-consent cookie with advertisement:yes or marketing consent | optinstack_marketing_accepted plus ad consent signals |
| CookieYes cookie-value trigger conditions | GTM Additional Consent Checks and OptinStack category events |

## 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 CookieYes 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

*OptinStack trigger and 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 |

> **Tip:** 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\.

### Do I remove the old CMP before OptinStack is live?

Install and verify OptinStack first, migrate GTM consent checks, test in a preview workspace, then remove the old CMP template and triggers to avoid double banners.

### What replaces vendor-specific GTM events?

Use OptinStack dataLayer events (for example optinstack_consent_updated and category accepted events) and Consent Mode signals driven by the runtime.

### Where is the full GTM guide?

See Integrate OptinStack with Google Tag Manager for template fields, Consent Overview, and testing steps.
