Skip to content

Free tool

Add a WhatsApp chat widget with Google Tag Manager

Already run GTM? Add the widget as one tag, choose exactly which pages show it, and track every chat as a conversion, all without touching your site's code.

  • Runs in your browser
  • Free, no signup
  • Updated
Configure on the left — the preview and script update live.

Configure WhatsApp chat button

The floating button every visitor sees.

Button background

😊 Emoji welcome. You can use {{page_url}} & {{page_title}} — filled with the page the visitor is on.

Position

Chat widget

The card that opens above the button — brand it like your own.

Brand color

😊 Emoji welcome — {{page_url}} & {{page_title}} work here too.

Open widget on mobile
Open widget by default
Re-open by default

After a visitor closes it, when may it auto-open again?

URL personalization

Personalize the messages based on your website's URL — a rule matches when its source URL appears in the visitor's address. Parameters: {{page_url}}, {{page_title}}.

Format parameter values

Applies to the substituted {{page_title}} value — "red-shoes – your store" becomes "Red shoes – your store". URLs stay untouched.

Live preview

Widget design

Gradient header with the greeting on a floating card. Click the button in the preview to close and reopen it.

{{page_title}} previews as "Red shoes – Your Store". On your site the real page title and URL are used — pick a rule above to preview its personalization.

Your embed script

<!-- Enter your WhatsApp number to generate the script -->

Paste it just before </body>. The widget loads async from infiq.in, runs no inline code and draws itself in its own sealed layer, so your theme's CSS can't break it. Works on any site: Shopify, WordPress, Wix, custom. Keep the "Powered by InfiQ" link inside — it's the small credit in the chat card's footer.

Configured in your browser — the script only runs on your site.

Keyboard shortcuts

  • Show these shortcuts?

Shortcuts work while the cursor is inside the tool.

Quick answer

How do I add a WhatsApp widget to Google Tag Manager?

To add a WhatsApp widget with Google Tag Manager, build it above and copy the embed code. In your GTM container, create a Custom HTML tag, paste the code, set the trigger to All Pages (or just the pages you want), then preview and publish. The widget also pushes an infiq_whatsapp_widget event you can use as a trigger.

Price
Free
Plugin or app
None
Setup time
About 5 minutes
You need
Google Tag Manager installed on your site

Step by step · 5 steps

Step by step: the WhatsApp widget on Google Tag Manager

  1. Step 1: Build and copy your widget

    In the generator on this page, enter your WhatsApp number with the country code, pick one of the five designs, set your colours and greeting, then click Copy script.

  2. Step 2: Create a Custom HTML tag

    In your container, go to Tags → New, choose Custom HTML and paste the embed code.

  3. Step 3: Choose the trigger

    Pick All Pages, or a Page View trigger with conditions, such as Page Path contains /products, to show it on chosen pages.

  4. Step 4: Preview

    Use Preview (Tag Assistant) to load your site and check that the tag fires and the button appears.

  5. Step 5: Submit and publish

    Submit the container version and publish it.

Google Tag Manager tips

Get more from the WhatsApp widget on Google Tag Manager

  • Track chats in GA4

    Create a Custom Event trigger for infiq_whatsapp_widget and a Data Layer Variable for infiq_widget_action. Fire a GA4 event tag (for example whatsapp_chat) when the action is chat, then mark it as a key event.

  • Consent Mode

    The widget sets no cookies and sends nothing to InfiQ. Your GA4 tag still follows your consent settings as usual.

  • A direct install is a touch faster

    GTM loads first and then the widget, so it appears a moment later than if you paste the code into the site itself.

Not sure which look to pick? Compare the five widget designs.

FAQ

WhatsApp widget for Google Tag Manager: questions and answers

Does a Custom HTML tag support this code?

Yes. The embed is a container, a JSON settings block and one async script, with no document.write, so it works as a standard Custom HTML tag.

Can I count WhatsApp chats as conversions?

Yes. Every open, close and chat click pushes infiq_whatsapp_widget to the dataLayer with infiq_widget_action set to open, close or chat. Trigger a GA4 event or a Google Ads conversion on the chat action.

Does it work with server-side GTM?

Install it in your web container. The widget runs in the visitor's browser, so a server-side container can't add it to the page.

Can I show the widget only on some pages?

Yes. Use a Page View trigger with conditions on Page Path or Page URL instead of All Pages.

Still have questions?

Book a demo

Meta Business Partner

Put a team behind the widget.

InfiQ turns every widget conversation into a managed lead — shared team inbox, chatbots, broadcasts and analytics on the official WhatsApp Business API. 7-day free trial, no card required.

7-day free trial Enterprise-grade reliability Live in 2 hours Built for Indian businesses