Field notes Field note 11
HubSpot Meetings Conversion Tracking in GA4 and Google Ads via GTM
HubSpot meeting conversion tracking in GA4 and Google Ads: listen for the embed's booking message in GTM, send one clean key event, dedupe and test it.
· 8 min read
HubSpot meeting conversion tracking usually fails for one reason: the booking happens inside HubSpot's embedded scheduler, the visitor never reaches a thank-you page, and GA4 and Google Ads see nothing. The fix is to listen in Google Tag Manager (GTM) for the message the embed sends to your page when a meeting is booked, then turn that into one clean GA4 key event and one Google Ads conversion. Or, if your HubSpot plan allows it, redirect to a thank-you page after booking.
A visitor picks a slot and confirms, the URL stays the same, and because the scheduler runs in an iframe that belongs to HubSpot, your GA4 and Ads tags have no idea it happened. You pay for the click, HubSpot's CRM knows about the meeting, and your ad reports say zero, so Smart Bidding optimises on a missing signal. This guide is the HubSpot sibling of our Calendly conversion tracking guide, and the same pattern is part of our conversion tracking services.
Checked on 2026-11-04 against: HubSpot Knowledge Base pages on the meetings embed code, the scheduling page confirmation redirect and meetings analytics, plus HubSpot Community and Usermaven threads on the booking message (not official documentation), GTM Custom HTML and Custom Event triggers, GA4 events and key events, Google Ads conversion import or tag, Tag Assistant, GA4 DebugView.
Step 0: log the booking message on your own page
The embed signals a booking to your page with the browser's window.postMessage(), according to HubSpot users (HubSpot Community: tracking booked meetings through Google Tag Manager). Two caveats before you build anything:
- You need the real embed, not a hand-made iframe. A reply in that thread says tracking won't work if you manually iframe your hosted meetings page. Copy the embed code from HubSpot: Sales, Meetings Scheduler, hover over the meeting, Actions, Embed, Copy code (HubSpot: embed the scheduling widget on a page).
- The message is not formally documented. The HubSpot embed article says nothing about messages or tracking, and we found no official page that does. So you inspect it yourself rather than trust a snippet blindly.
Community answers most often cite a window message whose data contains a meetingBookSucceeded flag, sent from a HubSpot origin. Treat that as a lead to check, not a guarantee. Sources disagree on two details:
- The key name. HubSpot Community answers check
event.data.meetingBookSucceeded(thread 1, thread 2), and one of them notes an older key name that was later replaced. A Usermaven guide describes aneventNameofmeetingBookedinstead. - The origin. Snippets in the community check for
app.hubspot.comin some answers andmeetings.hubspot.comin others. The advice in those threads is to look at the domain of the iframe your scheduler is actually served from and match that.
Do this once, before you write any tag. Open your page with the embed, open the browser console, and run:
window.addEventListener("message", function (e) {
console.log("origin:", e.origin, "data:", e.data);
});
Make a test booking. Messages that appear before you confirm (resizing, loading) are not the one you want. Write down the exact e.origin and the key in e.data that only shows up once the booking completes. Both go into the tag below, so everything after this step depends on them. Your embed may be served from a different HubSpot host than the examples above, which is why you log first and hard-code second. Remove the logging afterwards.
HubSpot's native tracking, and why GA4 and Ads still need their own event
HubSpot tracks bookings inside HubSpot, not inside Google. Its meetings dashboard reports views, meetings booked and conversion rate per scheduling page (HubSpot: analyze meetings). That is useful for sales reporting. For a GA4 key event and a same-session Ads conversion, you still need an on-page event.
HubSpot also documents a second route: on the scheduling page, open the Confirmation tab and choose Redirect to another page. HubSpot says that, with your ad network pixels installed, this redirect supports tracking meeting bookings with networks like Google and Facebook, and that it requires an assigned Sales or Service seat (HubSpot: create scheduling pages). If that works for you, point GA4 and Ads at the thank-you page view. The listener below is for when you cannot redirect.
Step 1: Add the message listener in GTM
In GTM, create a new tag of type Custom HTML and paste this. Fill in the two marked values from your Step 0 log. The tag does nothing until you do.
<script>
(function () {
window.dataLayer = window.dataLayer || [];
var locked = false;
window.addEventListener("message", function (e) {
// 1. Only trust HubSpot. Fill in the origin you logged in Step 0.
if (e.origin !== "https://YOUR-LOGGED-ORIGIN") return;
if (!e.data || typeof e.data !== "object") return;
// 2. Only react to the booking-complete signal you saw in your log.
// Replace YOUR_LOGGED_KEY with the key that only appeared after booking.
if (e.data.YOUR_LOGGED_KEY !== true) return; // adjust the test if your log shows a string, not true
// 3. De-duplicate: ignore repeats within 5 seconds
if (locked) return;
locked = true;
setTimeout(function () { locked = false; }, 5000);
// 4. Push a clean event. No names, no emails, no IDs.
window.dataLayer.push({
event: "hubspot_meeting_booked",
booking_source: "hubspot_meetings_embed"
});
});
})();
</script>
Set the trigger to Initialization - All Pages or All Pages, or limit it to the pages that carry the scheduler. Name it something obvious, such as HTML - HubSpot meetings listener. Three choices in that code are deliberate:
- Origin check. Any script on the page can post a message, so only your logged HubSpot origin may trigger the conversion.
- No personal data. The message may carry booking details. Forward none of it: GA4's terms prohibit sending personally identifiable information.
- Your own event name.
hubspot_meeting_bookedstays stable even if HubSpot changes its payload.
Step 2: Trigger, GA4 event and Google Ads conversion
From here the trigger, GA4 tag and Ads conversion are identical to the Calendly guide, Steps 2 to 4, with the event name hubspot_meeting_booked. Three points to carry over:
- GA4 tag fields. Measurement ID: your GA4 measurement ID (G-...). Event name
generate_lead(a recommended GA4 event) orhubspot_meeting_bookedif you want bookings separate from form leads. You can create the key event ahead of time under Admin, Data display, Events, Create event: enter the exact event name, turn on Mark as key event and click Create (Google: mark events as key events). - Route A, imported GA4 key event. After importing, check in Goals that the action is primary, or it will report only in All conversions.
- Import or tag. Pick one route as primary. If you keep both, set the other to secondary. Name it clearly, for example "Booked call (HubSpot)", and count one conversion per click.
Step 3: Respect consent
The listener only pushes an event to the dataLayer (GTM's shared data queue on your page), which is not a measurement. Google's GA4 and Ads tags have built-in consent checks, so leave their Additional consent setting at 'No additional consent required'. With Consent Mode v2 in place, they adjust to the visitor's choice. Add extra consent requirements only to non-Google tags. If tags still behave as denied after a visitor accepts, run the checks in Consent Mode v2 not working. Also remember that HubSpot's own tracking code and cookies are a separate consent question from your Google tags. Check both in your banner setup.
De-duplication: ways HubSpot bookings get counted twice
- Two listeners. A plugin, theme snippet or HubSpot's own page script may also listen for the same message. Search your page source for the message key you logged and keep one listener.
- Listener tag firing twice. If the Custom HTML tag fires on both All Pages and a Window Loaded trigger, it registers two listeners and every booking pushes twice. The five second lock catches this, but fix the cause.
- Message plus redirect. If you use the confirmation redirect and the listener, you will fire twice. Choose one.
- Ads import plus Ads tag. Keep one route primary, as above.
- Single page apps. If the tag re-runs on every route change, set it to fire once per page load. Our guide to GA4 tracking on single page apps covers route changes in detail.
Step 4: Test it end to end
Use a real test booking and cancel it straight after.
- Open Tag Assistant, enter your site URL and connect.
- Scroll to the scheduler and complete a booking with a throwaway address.
- In the Tag Assistant summary, find the
hubspot_meeting_bookedevent. The GA4 tag should be listed under Tags Fired for it, once. - Open GA4 Admin, Data display, DebugView. The event should appear once, with
booking_source. - On Route B, confirm the Ads tag fired and the Conversion Linker ran earlier in the session.
If the console shows the message but no hubspot_meeting_booked event exists, the cause is usually a mismatched e.origin or key. Compare them to your log. If the dataLayer event exists but GA4 stays silent, check the trigger name and that your test visit granted consent. Reports lag: DebugView shows the event in seconds, but standard reports and Ads conversion columns take longer.
When this approach does not apply
- Links that open the HubSpot page in a new tab. The booking happens outside your GTM container. Use the confirmation redirect if your plan allows it.
- Embeds inside a page builder or another tool. The message may not reach the top window where GTM runs. Test in Tag Assistant first.
- React and similar frameworks. Community reports say the embed script can behave unreliably there. Confirm in the console that the message actually arrives.
When to get help
If the console shows nothing, the embed sits inside another tool, or you want the booking tied to the right campaign in Google Ads, our conversion tracking service covers it. If bookings reach GA4 but not Ads, work through why Google Ads conversions are not tracking. The Tracking Audit checks your booking flows end to end and lists what to fix first. You can also run the Site Scanner for a first look at what your site fires.
Quick checklist
- Official HubSpot meetings embed in place, no hand-made iframe
- Origin and message key confirmed in your own console log
- One Custom HTML listener, origin checked, locked against repeats
- Nothing personal pushed to the dataLayer
- Custom Event trigger on
hubspot_meeting_booked - GA4 event tag on built-in consent checks, marked as key event
- One Ads route primary, and not alongside a redirect conversion
- Test booking seen once in Tag Assistant and DebugView