Migration & deprecations

Markdown
Loading…

Deprecated option names that still work, the current name for each, and the console warning that points you here.

A few option names are deprecated. They still work, but log a [cookieyes] warning, and they will be removed in a later release. If you see one of these warnings, or copied an older snippet, use the current name:

WhereDeprecatedUse insteadNotes
initCookieYes() option mode"offline""cookie-only"Same behaviour, clearer name
initCookieYes() optionbackendURLapiUrlUnder mode: "self-hosted"
initCookieYes() optionoverrides: { regulation }regulation at the top level
initCookieYes() optionbuiltInIntegrations: [{ vendor: "meta" }]integrations: [metaPixel({ ... })], with presets from @cookieyes/scriptsThe presets also load the tool after consent. See Integrations
Function exported by the packagecreateCookieYes().mode(...).mount()initCookieYes({ ... })One object instead of a chain; the keys have the same names, except .blockNetwork(), which is networkBlocker
TypeScript type exported by the packageConsentRuntimeOptionsCookieYesConfig

If both an old and a current name are set, the current one wins. The one exception is integrations and builtInIntegrations: both run, so remove the old entry once you add the preset, or the vendor's events are counted twice.

Everything else is unchanged: components, hooks, styling, translations and categories keep the same names, and the same configuration object works in every CookieYes package.

Next steps

On this page