Allow for conversion tracking with Meetings in HubSpot

Finally after spending couple of hours and thanks to the post from thomas_workpath, we figured out on adding conversion tracking code until Hubspot adds the TYP redirection-

You can create a new tag in GTM with ‘Custom HTML’ tag type, copy paste the below code snippet and set the trigger to fire at page view on all the pages where Hubspot meeting iframe is embeeded -

<script type="text/javascript">window.addEventListener('message', function receiveMessage(e) { if (e.origin.match(/YOURDOMAIN\.com/)) { if (e.data && e.data.meetingBookSucceeded) { if (e.data.meetingBookSucceeded == true) { try { // YOUR CONVERSION TRACKING CODE HERE LIKE __adroll.record_user({"adroll_segments": "XXXXX"}); } catch (err) {} } } }}, false);</script>