Track AI traffic and leads with Google Tag Manager
Already running Google Tag Manager? Add Which AI Sent as one tag and see which visits, leads and sales come from ChatGPT, Gemini, Perplexity, Claude and Copilot, without touching your site’s code.
Add the tag (5 minutes)
- In your Which AI Sent dashboard, open Setup and copy your snippet. It looks like
<script async src="https://whichaisent.com/t.js" data-key="…"></script>. - In Tag Manager, open your container and click Tags → New. Name it Which AI Sent.
- Choose Tag type → Custom HTML and paste the snippet.
- Under Triggering, choose All Pages.
- Click Save, then Submit → Publish.
Check it in Preview mode: the Which AI Sent tag should show under Tags Fired on page view. Then click Open my website as a ChatGPT visitor in your dashboard and watch the test visit arrive.
Tip: publishing a container publishes everything in the workspace. If colleagues have unfinished changes, create a new workspace for this tag first.
One-click Tag Manager (coming)
We’re finishing Google’s verification for one-click Tag Manager setup. You’ll click Connect, approve on Google’s screen, and we’ll add the tag in a fresh workspace (so none of your unpublished changes go live), publish it, and immediately give up access. No long-term access to your Google account is kept.
Cookie consent
If you use Consent Mode or a consent platform through Tag Manager, you have two options. Fire the tag only after consent, using your consent trigger instead of All Pages. Or keep All Pages and switch on Wait for cookie consent in Which AI Sent’s Settings. The script also respects Global Privacy Control.
Do I still need GA4’s AI channel?
Keep it. GA4 is your general analytics. Which AI Sent adds what GA4 doesn’t: each lead’s AI source, the customers who asked an AI and then phoned, and the revenue. See Which AI Sent vs GA4. For GA4’s side of the setup, see AI traffic in GA4.
Tracking AI traffic in GTM without us
If you just want to label AI visits in your own tags, create a Referrer variable and a lookup or regex table that matches AI hostnames. The regex is in our free AI referral regex generator. The AI traffic reference lists what each assistant sends.
Other platforms: all integrations.
Tag Manager questions
Will the tag slow my site down?
No noticeable effect. It loads asynchronously and sends a tiny message only when a visit starts or someone gets in touch.
Does it work with server-side GTM?
Add it to your web container as above. The script talks to Which AI Sent directly from the browser.
Does it capture form submissions through GTM?
The script detects form submissions on the page itself, so you don’t need to build form triggers.
How do I remove it?
Pause or delete the tag and publish the container.
See what AI is already sending you
Connect your website in one click, add one question to your form, and see AI leads and revenue with the evidence for each.