I want to track the conversion, when a customer schedules a meeting via the Hubspot Meeting embed I’ve on my website. I have tried multiple routes but was not able to resolve. As there is no Thankyou page (redirect) as well. There was a mention of using event listener but no details were mentioned. Any help would be highly appreciated.
Hi @msameerh,
Thank you for reaching out to the Community!
This Community post has more details on the solution with the listener code.
I also wanted to tag in a couple of subject matter experts to see if they have any input on this matter:
hi @jolle, @RDixon3, @Katherinegavin1, do you have any advice for @msameerh? Thank you!
Cheers
Mia, Community Team
Hey @msameerh did you find a solve for this? I’m trying to use the meeting scheudle embed as well and having issues. or @MiaSrebrnjak ? thanks in advance ![]()
@msameerh in addition to the link from @MiaSrebrnjak, I’d like to ask: How are you defining ‘track the conversion’ for you? Is it a report? Or in a workflow to trigger an action? The meeting links are found in Form Submissions when you’re looking at lists, workflows, and other areas. If they fill out a meeting form (which will shedule the meeting), that’s a conversion.
I hope that helps!
Hi there,@danmoyle! We want to track the conversion as an event for our Google Ads and Meta Ads campaigns. We were able to set up these events for regular HS forms with the Form ID but we are facing issues with Meeting scheduling embed. I am yet to try the solutions mentioned by @MiaSrebrnjak (Thanks). Will be doing soon and letting you know.
Thanks for the help @MiaSrebrnjak and @danmoyle . I was able to track meeting schedules as conversions/events using Google Tag Manager. Posting the solution here so that others can benefit too.
Step 1:
Fire a custom JS to push an event to data layer when the meeting is scheduled. This should be on the page where the embed code is.
<script type="text/javascript">
window.addEventListener("message", function(event) {
if (event.origin !== "https://meetings.hubspot.com") {
return;
}
if (event.data.meetingBookSucceeded) {
// The code for triggering an event in GTM
dataLayer.push({'event': 'meetingCreated'});
}
});
</script>
Step 2:
Create a custom event trigger using the event (meetingCreated) we pushed to dataLayer in Step 1
Step 3:
Create a GA4 event tag and trigger it on the Custom Event we created in Step 2
I will tried this! thank you
This is great, one further thing to note, is if you change your meeting link url to a custom domain you have to test the event.origin for your custom domain not the hubspot one (although i test it for both just in case).
Also you can add the script directly via your GTM as a custom HTML Tag
This way you can ensure it only runs when the correct cookies and privacy is accepted
Hello @Maxx_NWR
I hope you’re doing well! Have you tried the options provided in the thread? If so, could you let me know which part of the process you’re getting stuck on? It would be great if you could share some screenshots as well.
Thank you!
Diana

