
Zoho SalesIQ GTM Event Listener
Free Zoho SalesIQ tracking code for GTM. Tracks chat starts, offline messages, button clicks and ratings as one clean event, ready for GA4 and Google Ads.
zoho_salesiq_event Get the code

Copy this into a Custom HTML tag in Google Tag Manager. It pushes acuity_booking to the dataLayer when someone books through Acuity Scheduling.
<script>
/* Acuity Scheduling listener by MD Niamul - mdniamul.com
Fires acuity_booking once per booking. Works with the scheduler
embedded on your site (iframe) and with GTM added to Acuity's own
page. Needs the small sender script in Acuity → Custom conversion
tracking (see the setup steps). */
(function () {
if (window.__mdnAcuityBasic) return; // tag fired twice: keep one copy
window.__mdnAcuityBasic = true;
var CURRENCY = 'USD'; // your Acuity currency (EUR, GBP, CAD, AUD...)
var ACUITY = /^https://([a-z0-9-]+.)*(acuityscheduling.com|squarespacescheduling.com|as.me)$/i;
window.dataLayer = window.dataLayer || [];
var sent = {};
function seen(id) {
if (sent[id]) return true;
sent[id] = true;
try {
if (localStorage.getItem('mdn_acuity_' + id)) return true;
localStorage.setItem('mdn_acuity_' + id, '1');
} catch (e) {}
return false;
}
function push(b) {
if (!b || typeof b !== 'object' || b.source !== 'mdn-acuity' || !b.id) return;
if (seen(String(b.id))) return; // one push per booking, also after a reload
var value = parseFloat(String(b.price || '0').replace(/[^0-9.-]/g, '')) || 0;
window.dataLayer.push({
event: 'acuity_booking',
transaction_id: String(b.id),
value: value,
currency: CURRENCY,
appointment_type: b.appointmentType || '',
booking_type: value > 0 ? 'paid' : 'free',
page_path: window.location.pathname
});
}
// Did the message come from inside an Acuity iframe on this page?
function fromAcuityFrame(src) {
var frames = document.getElementsByTagName('iframe');
for (var i = 0; i < frames.length; i++) {
if (!ACUITY.test((frames[i].src || '').split('/').slice(0, 3).join('/'))) continue;
var w = src;
for (var d = 0; d < 4 && w; d++) {
if (w === frames[i].contentWindow) return true;
if (w === window || w === w.parent) break;
w = w.parent;
}
}
return false;
}
// 1) Scheduler embedded on your site
window.addEventListener('message', function (e) {
if (!e || typeof e.data !== 'string' || e.data.indexOf('mdn-acuity') === -1) return;
if (!ACUITY.test(e.origin) && !fromAcuityFrame(e.source)) return;
var b; try { b = JSON.parse(e.data); } catch (err) { return; }
push(b);
}, false);
// 2) GTM added inside Acuity's custom conversion box (direct booking page)
window.addEventListener('mdn-acuity-booking', function (e) { push(e && e.detail); }, false);
if (window.__mdnAcuityBooking) push(window.__mdnAcuityBooking);
})();
</script>
This code is also on GitHub with a README and version history: github.com/mdniamul0/acuity-scheduling-gtm-listener
acuity_bookingacuity_booking, use it on your GA4, Google Ads or Meta tag, then Preview and Publish.After you install the code and send a test entry, this is the data that shows up in GTM. You don’t need to paste it anywhere. Use it to check the listener works and to create Data Layer Variables such as form_id.
{
event: 'acuity_booking',
transaction_id: '1512495506',
value: 85,
currency: 'USD',
appointment_type: 'Puppy Training Session',
booking_type: 'paid',
page_path: '/book/'
}Acuity needs two small pieces: a sender inside Acuity and a listener in Google Tag Manager. Together they work when the scheduler is embedded on your website and when clients book on Acuity’s own page.
CURRENCY at the top if you don’t charge in USD.acuity_booking. Add Data Layer Variables for transaction_id, value, currency, appointment_type and booking_type.purchase event with transaction_id, value and currency, and a Google Ads conversion with the same value. Free bookings: a GA4 generate_lead event. Use booking_type (paid or free) to split them.acuity_booking shows up once with the right price, and publish your container. Cancel the test booking in Acuity.<script type="text/plain" id="mdn-acuity-data">
id=%id%
price=%price%
type=%type%
appointmentType=%appointmentType%
</script>
<script>
/* Acuity booking sender (free version) by MD Niamul - mdniamul.com
Paste in Acuity: Integrations → Custom conversion tracking → HTML tracking code.
Acuity fills the %...% values above; quotes in names cannot break this code. */
(function () {
var el = document.getElementById('mdn-acuity-data');
if (!el) return;
var b = { source: 'mdn-acuity', version: 1 };
var tmp = document.createElement('textarea');
var rows = el.textContent.split(/\r?\n/);
for (var i = 0; i < rows.length; i++) {
var at = rows[i].indexOf('=');
if (at < 1) continue;
tmp.innerHTML = rows[i].slice(at + 1);
var val = tmp.value.trim();
b[rows[i].slice(0, at).trim()] = /^%[A-Za-z]+%$/.test(val) ? '' : val;
}
if (!b.id) return; // placeholders not filled: not a real booking
var msg = JSON.stringify(b);
// 1) Embedded on your site: send it up to the page that holds the scheduler
try { if (window.top !== window.self) window.top.postMessage(msg, '*'); } catch (e) {}
// 2) Direct Acuity page with GTM pasted in this box: hand it to GTM here
var top = '';
try { var a = window.location.ancestorOrigins; top = a && a.length ? a[a.length - 1] : ''; } catch (e) {}
if (!top || /(acuityscheduling|squarespacescheduling)\.com$|\.as\.me$/.test(top)) {
window.__mdnAcuityBooking = b;
try { window.dispatchEvent(new CustomEvent('mdn-acuity-booking', { detail: b })); } catch (e) {}
}
})();
</script>
Want the full ad setup? Read my guide on Google Ads Enhanced Conversions for Acuity Scheduling. If you’d rather have it set up for you, see my Google Ads tracking specialist page and my server-side tracking service.
The free code tells GTM that a lead happened. The advanced code tells your ad platforms who the lead is and where they came from.
| What you get | Basic Free | Advanced Paid |
|---|---|---|
| Fires only on a successful submit or booking | Yes | Yes |
| Form or platform ID in the dataLayer | Yes | Yes |
| UTM source, medium, campaign, term and content | No | Yes |
| Ad click IDs (gclid, wbraid, gbraid, fbclid, ttclid, msclkid) | No | Yes |
| SHA-256 hashed email, phone and name | No | Yes |
| First-party cookies (_fbp, _fbc, _ga, _gcl_aw) | No | Yes |
| Device, browser and visitor location | No | Yes |
| event_id for Pixel and CAPI deduplication | No | Yes |
| Ready for Google Ads Enhanced Conversions and Meta CAPI | No | Yes |
| Install help from MD Niamul | No | Yes |
Built for agencies and brands that run paid ads. Every lead carries the data that Meta, Google Ads, TikTok and GA4 need to match the person and credit the right campaign.
One-time price. Start with the code, or let me set everything up for you.
You install it yourself
We set it up together
I install and test it
Browser + server tracking
Stape.io plan paid separately
Server-side: Server-side tracking runs on Stape.io. The Stape plan is not included: you pay Stape directly (they have a free plan for small sites). I set it up on your account. Get Stape (global) · Stape EU server
One-time prices in USD. You pay me directly and get an invoice in your client portal.
Not sure which one fits? Message me and I will tell you what you need.
Already bought the advanced code? Get it in your client portal.
Yes, that is the best setup. The sender in Acuity's Custom conversion tracking box sends the booking to your page, and the listener checks it came from the Acuity iframe before it fires.
Paste your GTM container snippet in the same Acuity box and add the listener to it. The booking is tracked, but GA4 sees it as a new visit on Acuity's domain, so ad attribution is weaker. Embed the scheduler when you can.
Yes. Every event has value, currency and booking_type (paid or free). Send paid ones as a GA4 purchase with transaction_id and value, and free ones as generate_lead.
Message me on WhatsApp. After payment I add it to your client portal with the code, a setup video, a PDF guide and a GTM import file.
Yes. The basic code on this page is free to copy and use on your own or your clients’ sites. It fires the acuity_booking event when the Acuity Scheduling form is sent.
The basic version only tells GTM that a lead happened. The advanced version also sends UTM values, ad click IDs, hashed email and phone, first-party cookies, device and location data and an event_id, so Meta CAPI, Google Ads Enhanced Conversions and GA4 get much better data.
Message me on WhatsApp, book a call or use the contact form. It is a paid, one-time purchase, and I can install it for you if you like.
No. The listener runs inside Google Tag Manager and listens for the form’s own success signal. You don’t need to edit the form or your theme.
💬 Want this implemented without mistakes?
I’ve completed 850+ projects for 600+ businesses and 15+ agencies, helping clients generate $11M+ in revenue with accurate client-side & server-side tracking and business automation.
⮏ My core services include:
⨭ GoHighLevel Automation — build CRM pipelines, WhatsApp automation, AI voice workflows & automated follow-ups end-to-end.
⨭ AI Agent Automation — deploy AI chatbots & agents for 24/7 lead qualification and support.
⨭ Paid Ads Management — Google Ads, Meta Ads.
⨭ Full Stack SEO/GEO/AEO Manager.
⨭ CRO-Focused Web Development — Landing Pages on WordPress, Shopify, Wix, Squarespace.
⨭ Google Tag Manager (GTM) — manage data layers & (Marketing platform Tag, Trigger & Variables).
⨭ Custom Code by GTM — HTML, CSS & JavaScript for advanced marketing platform tracking.
⨭ Server-Side Tracking — recover data lost to ITP & ad blockers (Official Stape Partner).
⨭ Google Analytics 4 (GA4) — visualize customer journeys.
⨭ Multi-Channel CAPI — Facebook, TikTok, Pinterest & Snapchat Conversion API & Klaviyo email marketing tools.
⨭ Third Party Checkout Conversion Tracking — Shopify, Stripe, GoKwik, Shiprocket, PayPal or more.
⨭ Google Consent Mode (GCM) — maintain GDPR compliance.
⨭ Marketing Automation — streamline workflows (Zapier/n8n/Make).
⨭ CRM Conversion Tracking — link offline sales to ads.
⨭ Tag Management — GTM & Third-Party Checkout Tracking.
⨭ Offline & CRM Tracking — HubSpot, Salesforce, Zoho, Pipedrive, Odoo, Webhook & Sheet.
⨭ Advanced Analytics — GA4, Google Looker Studio & BigQuery (SQL) for deep data visualization.
If you want your Acuity Scheduling Tracking done right the first time, message me.