Skip to main content

Use with Google Tag Manager

If your site loads its tags — Google Analytics, Google Ads, Meta Pixel and the rest — with Google Tag Manager, ConnectWiz works with it in one of two ways:

Who asks for consentWho loads the tagsWhat you add
B — Google Tag Manager + ConnectWiz consentthe ConnectWiz bannerTag Managerthe ConnectWiz code + the ConnectWiz Consent template in Tag Manager
C — Google Tag Manager + your own consent toolyour tool (Cookiebot, OneTrust …)Tag Managerthe ConnectWiz code; ConnectWiz only reads your tool

A third way, A — ConnectWiz loads your tags, needs no Tag Manager at all: see Tag manager. For consent alone without Tag Manager, see Cookie consent.

In every mode the chat, the source capture, the forms and the WhatsApp ref codes come from the same ConnectWiz code, and ConnectWiz can push its own events into your dataLayer (below).

Who can set it up

Choosing the mode and switching the events on needs the Manage integrations permission (integrations.manage), like the rest of Settings → Integrations → Website.

Choose the mode​

  1. Go to Settings → Integrations → Website, open your site, Setup tab.
  2. Make sure Capture with the chat widget code is on (modes B and "ConnectWiz consent, tags on the page" need it: the consent runs inside the chat widget code).
  3. Under How consent and tags run on this site, choose B — Google Tag Manager + ConnectWiz consent or C — Google Tag Manager + your own consent tool. The install code and its steps follow your choice.

Mode B: Google Tag Manager + ConnectWiz consent​

The ConnectWiz banner asks the visitor; the ConnectWiz Consent tag template tells Tag Manager. The template:

  • sets every Google consent signal to denied for every visitor, before any tag runs (security_storage granted, wait_for_update 500 ms);
  • re-applies the visitor's stored choice (the cwz_consent cookie) at once on every page;
  • passes every new choice — accept, refuse, change, withdraw — to Tag Manager;
  • turns on ads_data_redaction and sets Microsoft UET (Bing Ads) to denied by default (both on by default, both can be switched off);
  • sets url_passthrough only if you tick Pass ad click information through page URLs (off by default). It lets Google tags measure ad clicks of visitors who refused cookies, so ask your legal adviser before you switch it on; if you use a Conversion Linker tag, switch URL passthrough on there too.
ConnectWiz categoryGoogle consent signals
Analyticsanalytics_storage
Marketingad_storage, ad_user_data, ad_personalization
Functionalfunctionality_storage, personalization_storage
Strictly necessarysecurity_storage (always granted)

Step by step​

  1. The ConnectWiz code on every page. In mode B the install code is the chat widget line only — there is no consent script for the top of <head>: the template sets the defaults. If the site had that script before, remove it.
  2. Add the template. In Tag Manager: Templates → Tag Templates → Search Gallery, search "ConnectWiz Consent", Add to workspace. Not in the gallery yet? In the ConnectWiz panel click Download the template file, then in Tag Manager Templates → Tag Templates → New → ⋮ → Import and pick the file.
  3. Create the tag. Tags → New → Tag configuration → ConnectWiz Consent. Trigger: Consent Initialization – All Pages. Leave the defaults.
  4. Region defaults (optional). Add region rows (ISO codes such as US, US-CA, BR) only if the Cookie consent tab has the same region rules. Türkiye, the EU/EEA, the United Kingdom and Switzerland always stay denied: the template refuses them.
  5. Your other tags. Google tags (GA4, Google Ads, Floodlight) read consent on their own. On every other tag — Meta Pixel, TikTok, LinkedIn, Microsoft Clarity, OpenAI … — open Advanced settings → Consent settings → Require additional consent for tag to fire and add the signal of its category: ad_storage for an ad pixel, analytics_storage for analytics. A tag that should run the moment the visitor accepts on the same page can also fire on the cwz_consent_update event (see events).
  6. Preview and publish. In preview, Tag Assistant should show every consent type denied before a choice and updated right after it. Then publish.
Meta and OpenAI pixels in Tag Manager

These two pixels do not read Google consent. With Require additional consent on their tags they are not even loaded until the visitor accepts marketing — which is exactly what they need.

The panel warns when visitors' browsers saw Google Tag Manager on your site in the last 30 days but not the ConnectWiz Consent template: Tag Manager then does not hear the visitor's choice.

Mode C: your own consent tool​

Keep your consent banner and its Tag Manager template as they are. ConnectWiz only reads its answer — Google Consent Mode commands in the dataLayer, or an IAB TCF tool — and keeps ad click ids and the _cw_at cookie only when marketing is granted. ConnectWiz records none of these choices: your tool keeps the proof. See Your own consent tool.

ConnectWiz events in the dataLayer​

Switch on Send ConnectWiz events to the dataLayer (cwz_*) in the same card (off by default). ConnectWiz then pushes these events, which you can use as Custom Event triggers in Tag Manager:

EventWhenParameters
cwz_form_submita form the script fills is sentevent_id, form_id
cwz_whatsapp_clicka WhatsApp link is clickedevent_id
cwz_phone_clicka tel: link is clickedevent_id
cwz_chat_startthe visitor's first message in a new chatevent_id
cwz_bookinga slot is booked in the chatevent_id
cwz_consent_updatethe visitor made or changed a choice (ConnectWiz consent)cwz_analytics, cwz_marketing, cwz_functional = granted / denied

A sale (a deal won in the CRM) happens on the server, not in the browser: it has no browser event; ConnectWiz sends it to Meta and Google Ads itself.

One event, counted once​

ConnectWiz sends its own server-side conversions to Meta (Conversions API) and Google Ads. When a tag in Tag Manager reports the same thing from the browser, give it the same event_id and the platforms keep one:

  • Meta Pixel: put event_id (a Data Layer Variable) into the tag's Event ID; use the same event name ConnectWiz uses (Lead for a form or a WhatsApp lead, Schedule for a booking).
  • Google Ads conversion tag: put event_id into Transaction ID.
EventSame id as ConnectWiz's server event
cwz_form_submitthe form's Lead (the form's cw_event_id field)
cwz_whatsapp_clickthe Lead sent when the ref code arrives in WhatsApp
cwz_bookingthe booking's Schedule
cwz_phone_click, cwz_chat_startnone — browser-only

What the events never carry​

No e-mail, phone, name, visitor id, consent id, ref code or ad click id goes into the dataLayer. event_id is added only while the visitor has accepted marketing. On a site with ConnectWiz consent, nothing is pushed before the visitor's first choice: events from that moment wait on the page and are pushed right after the choice (without event_id if marketing was refused).

The older cw_lead_attribution event (with cw_event_id) is still pushed on every form submit, as before.