Installing with Google Tag Manager
If your team already uses Google Tag Manager (GTM), install One Privacy with the One Privacy CMP tag template from the community gallery. The template loads the banner and sets the Google Consent Mode defaults inside GTM, on the Consent Initialization trigger, so the defaults are in place before any other tag fires. The setup takes a few minutes.
Before you startβ
In One Privacy, open Banner Configuration β Scripts and note your project ID. The template needs only that.
Add the One Privacy CMP tagβ
- Sign in to Google Tag Manager and open your container.
- Click Tags β New, then Tag Configuration.
- Click Discover more tag types in the Community Template Gallery, search for One Privacy CMP, and click Add to workspace.
- Name the tag, for example One Privacy CMP.
Configure the tagβ
Project ID. Paste the ID from the Scripts page.
Environment. Live (Production) loads the banner you published to Live. Test loads the banner you published to Test, for staging sites.
Default Consent Settings. The state Google tags start with before the visitor chooses. The table starts empty. With no rows, the template denies every consent type for All regions. Click Add Setting to add rows: pick granted or denied per type, and set Regions to All or to comma separated country codes such as DE, FR, IT (a more specific code such as US-CA wins over US). If you add rows, include an All row with everything denied, because the built-in deny-all applies only while the table is empty. A common setup is that All row plus one row for the regions where you show no banner with everything granted. Keep this table consistent with your geo rules: denied where a banner asks for consent, granted where it does not. security_storage is always granted.
Other Settings. The Send Consent Mode default and update commands checkbox (on), the wait_for_update delay (500 ms), and the ads_data_redaction and url_passthrough checkboxes. The defaults suit most sites. See Google Consent Mode v2 for the two settings, and Turning Consent Mode off before you untick the first checkbox.
Set the triggerβ
Under Triggering, choose Consent Initialization - All Pages.
This is the one step that must not change. Consent Initialization tags run before every other tag in the container, so the consent defaults are set before any Google tag can fire. A tag on All Pages or Initialization - All Pages runs later, and tags that fire on page view can run before the defaults exist.
Save and publishβ
Click Save. Click Submit in the top right of GTM, give the version a name (for example "Add One Privacy CMP"), and click Publish.
What the template does on the pageβ
On every page load, in this order:
- Identifies One Privacy to Google with its CMP developer ID and applies the two Other Settings.
- Sets the Consent Mode defaults from the Default Consent Settings table, per region.
- If the visitor already made a choice on your site, applies it as an
updateright away, so returning visitors keep their settings before any tag runs. - Loads the One Privacy banner script.
The banner script loaded this way does not send its own consent default, ads_data_redaction, or url_passthrough. The template's settings are the only ones that apply. After the visitor accepts or rejects, the banner sends the Consent Mode update, and your Google tags follow it without any other tag in the container.
Verify it worksβ
Open your website in a fresh browser session. The banner should appear within a couple of seconds.
Then open the browser console and run:
onePrivacy.debug()
The report should show Consent default: OK (set via Google Tag Manager template). See Debug Google Consent Mode and Verifying the banner is live.
If you cannot use the gallery templateβ
Some organizations block community templates. In that case, add the banner with a Custom HTML tag, and keep the same trigger:
- In One Privacy, open Scripts and copy the Production snippet (or the Test snippet for staging).
- In GTM, click Tags β New β Tag Configuration β Custom HTML and paste the snippet.
- Under Triggering, choose Consent Initialization - All Pages.
- Save, Submit, and Publish.
With a Custom HTML tag, the banner script itself sends the consent defaults (all denied, no region table). Do not rely on tag firing priority to order it; only the Consent Initialization trigger guarantees that the defaults come first. onePrivacy.debug() cannot see the order of tags fired inside the container, so it prints a TAG_MANAGER_ORDER_UNVERIFIED reminder for this setup; the trigger is your guarantee.