Direct snippet
Add the OptSens script tag to your site, first in the page <head>. This
method works on every platform and is the one we recommend.
Get your snippet
Your snippet, with your Domain ID already filled in, is on the Integration page in the dashboard, and in the Integration step of the guided onboarding while you set the domain up. It looks like this:
<script src="https://cdn.optsens.com/optsens.min.js/YOUR_DOMAIN_ID"></script>
Replace YOUR_DOMAIN_ID with the value shown in your dashboard.
Where to place it
The script must load first-party in <head>, before any Google or
marketing tags. This lets OptSens set consent defaults and start blocking
trackers before anything else runs.
- Open the HTML template that renders
<head>on every page. - Paste the snippet as the first script inside
<head>, above Google Tag Manager, Google Analytics, the Meta Pixel and any other tag. - Save and publish.
<head>
<script src="https://cdn.optsens.com/optsens.min.js/YOUR_DOMAIN_ID"></script>
<!-- your other tags go below -->
</head>
Rules to follow
- Load the script first-party, from your own page, not through a
third-party loader. A banner delivered only through Google Tag Manager
does not show in Safari Private Browsing, because Safari blocks
googletagmanager.com. - Do not add
asyncordefer. The script needs to run before the tags it manages. - Add the snippet once per page. Additional copies are ignored.
After installing
- Open your site in a private window. The banner shows on first visit.
- Run the implementation check. During first-time setup it runs as the onboarding Verify step, and you can run it at any time from the dashboard Integration page.
- Work through Verify installation for the manual checklist.
If the banner does not show, start with Install troubleshooting.