The article provides a detailed guide on how to track Hubspot booking forms with Google Analytics 4 (GA4) and Google Tag Manager (GTM). The process is broken down into two main steps:
- Adding an event listener in GTM to check for messages containing information on a successful meeting booking and sending this information to the Data Layer.
- Creating a GA4 tag to collect the data from the Data Layer and send it to Google Analytics 4.
The guide also includes a Javascript code for the Hubspot Meetings Listener, which adds an event listener to the window object. This listener checks if the message contains data indicating a successful meeting booking and, if so, pushes data related to the booking into the Data Layer.
The article then provides instructions on how to test the custom code, create a GA4 event and find data in reports, create a trigger, create Data Layer variables, and create a tag. It also explains how to find the Measurement ID in your Google Analytics 4 data stream and how to add other elements to the tag.
The guide also includes steps on how to test the new event and how to create event-scoped custom dimensions in GA4. Finally, it explains how to publish the container and find data in GA4.
The author, Julius Fedorovicius, concludes by reminding readers that Hubspot booking forms require a different listener than regular Hubspot forms. He also mentions that he has a video on his YouTube channel discussing regular forms.