Skip to main content

Tag manager — ConnectWiz loads your tags

With the tag manager, the ConnectWiz code on your site does more than ask for cookie consent: it loads your marketing and analytics tags itself, only after the visitor allows them, and sends them your key moments — a form sent, a WhatsApp or phone click, a chat started, a booking — without Google Tag Manager and without pasting each vendor's code.

You type only the ids. ConnectWiz supports:

TagWhat you enterWhere to find itConsent category
Google Analytics 4Measurement ID G-…GA4 → Admin → Data streamsAnalytics
Google AdsTag ID AW-…Google Ads → Goals → Conversions → Google tagMarketing
Meta PixelPixel (dataset) ID, digitsMeta Events Manager → Data sourcesMarketing
TikTok PixelPixel codeTikTok Ads Manager → Assets → EventsMarketing
LinkedIn Insight TagPartner ID, digitsCampaign Manager → Data → Insight TagMarketing
Microsoft ClarityProject IDClarity → Settings → OverviewAnalytics
Microsoft Advertising (UET)UET tag ID, digitsMicrosoft Advertising → Tools → UET tagMarketing
Yandex MetricaCounter numberMetrica → SettingsAnalytics
OpenAI AdsPixel IDOpenAI Ads → MeasurementMarketing

This is mode A of the three ways ConnectWiz consent can run on a site (B and C use Google Tag Manager — see Use with Google Tag Manager).

Plans and permissions

The tag manager is in the Pro plan and above, and in the trial. Cookie consent itself stays on every plan. If the plan changes to one without the tag manager, ConnectWiz stops loading the tags on the site at once (your settings are kept).

Seeing the Tags tab needs Manage integrations (integrations.manage). Editing the draft needs Edit site tags (site_tags.edit); publishing and rolling back need Publish site tags (site_tags.publish). Both are given to admins only by default — give them to others under Settings → Team.

Turn it on​

  1. Settings → Integrations → Website, open your site, Setup tab.
  2. Make sure Capture with the chat widget code is on.
  3. Under How consent and tags run on this site, choose A — ConnectWiz loads your tags.
  4. The install code is the same block as for ConnectWiz consent: the short inline script at the very top of <head>, then the widget line. If you already pasted it, nothing changes on your site.
  5. Open the Tags tab, add your tags and publish (below). Until a version is published, no tag is loaded.

Remove the same tags from your page (or from Google Tag Manager) once ConnectWiz loads them — or tell ConnectWiz that the site loads them (see Who loads a tag). A tag loaded twice counts every visit and every conversion twice.

Add your tags​

In the Tags tab, add each tag you use and type its id. The panel checks the shape of each id (G-…, AW-…, digits …) before saving.

  • Google Ads conversion labels — only for phone clicks and chat starts. Forms, WhatsApp conversations, bookings and sales already reach Google Ads from the server with their own conversion actions (see Google Ads); counting them in the browser too would count them twice, so the panel does not take a label for them.
  • LinkedIn conversion ids — one per event, for the events you track as LinkedIn conversions.
  • Meta — if the workspace already sends conversions to a Meta dataset (Conversions API), the panel offers that id: the dataset id is the pixel id.

Who loads a tag​

Each tag has an owner:

  • ConnectWiz loads it (default) — ConnectWiz adds the tag's code and sends it the events.
  • The site or Google Tag Manager loads it — ConnectWiz loads nothing for it and sends it nothing. Use this for a tag you keep in your page or in Tag Manager: it still appears in the cookie banner, and the duplicate check knows it is yours.

The events​

Switch on the events you want the tags to receive. ConnectWiz sends each one in the vendor's own words:

EventGoogle Analytics 4MetaTikTokMicrosoft (UET)OpenAI
Form sentgenerate_leadLeadSubmitFormsubmit_lead_formlead_created
WhatsApp clickwhatsapp_clickContactContactcontact—
Phone clickphone_clickContactContactcontact—
Chat startedchat_startContactContactcontact—
Bookingbook_appointmentScheduleSchedulebook_appointmentappointment_scheduled

Google Ads gets a conversion only for phone clicks and chat starts with a label. LinkedIn gets the conversions you gave an id. Clarity gets a cwz_<event> event and Yandex a cwz_<event> goal. A sale is never a browser event: it is sent from the server when a deal is won.

A WhatsApp click is a Contact, not a Lead. The lead is counted when the visitor's WhatsApp message actually arrives — the server sends it then, with the ref code. A visitor who clicks and changes their mind is not counted as a lead.

One event id, counted once. Every event carries the same id as its server copy: Meta's eventID, TikTok's and OpenAI's event_id, Google Ads' transaction_id, LinkedIn's event_id. When the browser and the server both report a form or a booking, the ad platform keeps one. The id is sent only while the visitor allows marketing.

  • Nothing loads before the visitor's choice — not even Google's tag. Each tag loads as soon as its category is allowed: analytics tags with Analytics, advertising tags with Marketing. A visitor who allows only Analytics gets Google Analytics, Clarity and Yandex, and no advertising tag.
  • Google consent mode — advanced (optional). In the Tags tab you can let Google's tag alone load before the choice, with every signal denied. Google then receives cookieless pings and models the conversions of visitors who refuse. It also means the visitor's address reaches Google before they chose: ask your legal advisor before switching it on. The default is basic.
  • Withdrawing consent stops the events at once. Tags with a consent switch (Google, Meta, Clarity, UET, OpenAI) are told; the cookies of TikTok, LinkedIn and Yandex are deleted. Tags already loaded on the page stay until the visitor opens another page, where they are not loaded again.

Draft, publish, roll back​

Like Google Tag Manager, the tags are kept in versions:

  1. Every change goes into the draft: nothing reaches your site while you edit. Save draft keeps it. If someone else saved the draft in the meantime, you are asked to reload instead of overwriting their change.
  2. Publish turns the draft into the next numbered version and makes it live. Add a short note — what changed — for the version list.
  3. In the version list, Make live on an older version brings it back in one click. Nothing is deleted: the newer versions stay in the list and the draft is not touched.

Visitors get a new version on their next visit; a visitor already browsing keeps the version they started with until they open the site in a new tab.

A new tag asks every visitor again

Publishing a version that names a tag the cookie banner does not list yet adds it to the banner — and a new vendor is a change visitors must agree to, so the banner asks everyone again (see Publishing and versions). The panel tells you before you press Publish.

Tags loaded twice​

Before loading a tag, ConnectWiz looks at the page: if the same id is already there — your own code, or a tag Google Tag Manager added — it does not load it again. Visitors' browsers report it, and the Tags tab shows "found already loaded on the page" for that tag. Choose one owner: remove it from the page or Tag Manager, or set its owner to The site or Google Tag Manager.

Google Analytics and Google Ads share one Google tag: if your page already has one, ConnectWiz uses it instead of adding another.

Custom HTML/JS tags​

For a tag ConnectWiz has no ready integration for — Hotjar, a chat or review widget, an affiliate pixel — add a custom tag: your own HTML or JavaScript, run by ConnectWiz under the same consent and version rules, with stricter review because it is code on your visitors' pages.

Each custom tag has:

  • a consent category — Analytics, Marketing or Functional. A custom tag always waits for the visitor's consent; it cannot be marked "necessary". Code that really must run without consent belongs in your site's own code.
  • a type — HTML (markup; its <script> tags run when it is added) or JavaScript (plain code, run as one script);
  • a trigger — once on every page, or on one or more of the ready events (form sent, WhatsApp or phone click, chat started, booking). While it runs, window.cwz.tagEvent holds the event that triggered it ({ name, event_id }; { name: 'page' } on a page trigger);
  • an optional page filter — run only where the page address contains, or starts with, a path you give (for example /tr/).

Up to 20 custom tags, 32 KB of code each and 128 KB in all.

The safety rules​

  • Two-factor sign-in. Writing custom code into the draft needs two-factor sign-in on your account (Edit profile → Security). Publishing, approving, or rolling back to a version with custom code asks for your two-factor code again (authenticator app, e-mail code or a recovery code); it holds for 15 minutes.
  • The platform check. Before a version with custom code can go live, ConnectWiz checks it for known crypto-miners, blocked addresses, code that reads password or card fields and sends something out, and code hidden behind eval(atob(…)). A finding is shown next to the tag and blocks publishing.
  • Four eyes. In a workspace with two or more active members, a version with custom code does not go live when you publish it: it waits for approval. Another member with Approve site tags with custom code (site_tags.approve) — not the person who submitted it, nor the last person who wrote the draft — reviews it and makes it live, or turns it down. One version waits at a time. An admin can switch the rule off for the workspace (with the two-factor code); the panel keeps warning while it is off.
  • Your stop switch. Run custom tags on this site turns every custom tag off at once (new pages within a minute); turning it back on asks for the code. On the page itself, data-cwz-block="custom" on the widget's script line does the same.
  • ConnectWiz's stop. If ConnectWiz operations find a custom tag doing harm, they can stop it (or all of a site's custom tags). The Tags tab then shows the stop and its reason; only ConnectWiz can lift it.
  • AI agents can write custom tags into the draft over MCP, but never publish them: a person does, in the panel.
  • Every change, publish, approval, rejection and stop is in the workspace's audit log.

Preview before publishing​

Preview the draft gives a link to your site that is valid for 30 minutes. Only the browser that opens it runs the draft — custom tags included — and a small panel in the corner lists each tag: loaded, ran, waiting for consent, or not on this page. Everyone else keeps the live version. Saving the draft again makes the link stop working: make a new one. The preview needs the site to be in mode A with a published version (that is what loads the tag manager on the page).

Content Security Policy​

If your site sends a Content-Security-Policy header, the Tags tab lists the sources to allow, by directive — ConnectWiz itself, each tag you load, and the addresses written in your custom tags. Custom tags also need inline scripts: put a nonce on the widget's script line (ConnectWiz hands it on to every script a custom tag adds), or allow 'unsafe-inline'.

With an AI agent (MCP)​

Over MCP (your own AI agent, see Analyse conversions with Claude), get_site_tags reads the tags, update_site_tags_draft writes the draft (an MCP key with mcp:write and the member's Edit site tags) and publish_site_tags publishes it (Publish site tags) — a draft of typed tags only: custom tags are published by a person in the panel. Ask the agent to check banner_adds first: a new vendor asks every visitor again.

Not in this version​

  • Server-side tagging (an sGTM equivalent) and Google tag gateway.
  • More than one id per vendor (for example two Meta pixels) — keep the second in your page and set it to The site or Google Tag Manager.