Installing optzi! on your site
Add the optzi! snippet to your website's global head code, then publish and verify the installation.
Last updated About 13 hours ago
Use this guide to add the optzi! consent banner to your website. You will copy one site-specific snippet, add it to your site's global head code, publish your website, and confirm that optzi! detects it.
You are done when: the banner appears in a private browser window and Deploy & detection shows a recent detection on the right domain.
Before you start
You need:
Access to the optzi! site you want to install
Access to your website's global head code or site-wide code settings
Permission to publish your website
A private or incognito browser window for testing
If your website builder uses a different name, look for a site-wide setting called Custom code, Head code, Header scripts, Code injection, or Integrations. Do not paste the snippet into the content of one page.
1. Copy the snippet for this site
In optzi!, open your site and find Install on your site.
Choose the option under If optzi! is temporarily unreachable that fits your site.
Copy the complete snippet shown below that setting.
The snippet is unique to this optzi! site. Do not reuse it for another root domain. Do not edit it or copy a placeholder from a help article.
Important: re-copy the snippet after changing the outage setting. The setting lives in the code on your website, so saving it in optzi! alone does not update the live site. Copy and install the newly generated snippet before treating the change as active.

The installation card shows the site-specific snippet, the placement requirement, and the outage behavior setting. The snippet value is blurred in this example.
2. Add it to your global head code
Open your website's site-wide head-code setting and paste the snippet inside <head>.
Put it before:
Google Tag Manager
Analytics scripts
Advertising and retargeting pixels
Chat, scheduling, video, and other optional third-party tools
Your code should follow this order:
<head>
<!-- Paste your complete optzi! snippet here first. -->
<!-- Put GTM and other third-party scripts after optzi!. -->
</head>Do not add async or defer to the optzi! snippet. Do not move it to the end of the page or into the page body.
Why this matters: browsers run page scripts in order. optzi! needs to start first so it can apply your consent settings before other optional tools begin loading.
Do not install the optzi! loader through Google Tag Manager (GTM). Put it directly in your website's
<head>before GTM. GTM cannot run the optzi! loader before GTM itself starts, so it cannot reliably set consent defaults before GTM or its tags initialize. You can still use GTM for approved analytics or marketing tags after optzi! is installed directly.
3. Save and publish your website
Save the code setting, then use your normal website publishing or deployment flow.
Some platforms save code without updating the public site. If your site has a separate Publish, Deploy, or Make live button, use it.
If your website uses caching, clear its page cache and CDN cache after publishing. This is common with WordPress cache plugins, hosting platforms, and CDNs.
4. Publish pending optzi! changes
Return to optzi! and check the site status.
If optzi! shows Publish, Deploy changes, or Deploy to activate, complete that action. Saving a banner or rule in the dashboard does not always make the latest configuration live on your website.
5. Confirm that it works
Open your public website in a private or incognito window. A normal browser window may remember a previous consent choice and hide the first-visit banner.
Check these results:
The consent banner appears.
The banner looks like the design you saved.
The privacy-policy link opens the right page.
In optzi!, Deploy & detection shows a recent detection on the expected domain.

optzi! confirms the deployment and records a recent detection on the expected domain.
If the banner does not appear
Check these items in order:
Confirm that you published the website after adding the snippet.
Confirm that the snippet is in the public site's
<head>, not only in an editor preview or one page.Confirm that the snippet appears once, not twice.
Confirm that it appears before GTM, analytics, and advertising scripts.
Confirm that nobody added
asyncordeferto the optzi! snippet.Compare the public code with the current snippet in optzi!. It must match exactly.
Clear your CMS, plugin, host, and CDN caches.
Test again in a new private window.
If you can see the script tag in page source but the browser never requests the optzi! widget, the installation is not working. The website builder may have escaped the code, placed it in an inactive template, or still be waiting for a separate publish step.
If optzi! says “Not yet detected”
Follow the same checks above, then visit the public site in a private window. If Check now is available in Deploy & detection, use it after you have loaded the public page.
If optzi! reports a different root domain, do not reuse this snippet there. Create a separate optzi! site for that root domain and install its generated snippet.
For developers and site builders
Keep every attribute in the generated script. In particular, do not remove or change its release URL, integrity value, crossorigin setting, site key, or data-fail-mode value.
If the website uses a tag manager, theme, plugin, or framework that adds scripts dynamically, install optzi! before that loader. Then test the consent path in a private window. A hard-coded script above optzi! can run before optzi! has a chance to manage it.
For help with a specific vendor, include the public page URL, your website platform, what you expected, what happened, and the approximate test time. Do not send passwords, payment-card details, private keys, session tokens, or JWTs.
Legal note
This article explains how to use optzi! and is not legal advice. Your obligations may vary by jurisdiction and implementation. Consult qualified legal counsel for advice about your situation.