Standard GTM & Google Analytics Tracking

Set up the following tracking as standard best practice and where applicable.


HubSpot Pop-Up Form Submissions

Example GTM account - NZHL (GTM-WDH345)

1. Create a trigger as below:

2. Create a tag as below and add your trigger from above. 


HubSpot Meeting Booked

Example GTM account - Review You (GTM-NQJ9DMJ)

1. Create a custom HTML tag to listen for the 'hubspot-meeting-booked' event. Use the All Pages page view trigger. 

Copy and paste the code below:

<script>
window.addEventListener( 'message', function(event) {
if ( event.data.meetingBookSucceeded ) {
window.dataLayer.push({
'event': 'hubspot-meeting-booked'
});
}
});
</script>

 

2. Create a trigger as below:

3. Create a tag as below and add your trigger from above. Ignore the Google Analytics Setting from below - use the appropriate Analytics variable from your account. 


Email & Phone Link Clicks

These two events can be tracked through one tag in GTM and two separate goals in analytics for each event. 

1. Create a trigger as below - the Click URL matches RegEx to mailto:|tel:

2. Create the tag as below:

3. In Analytics, create an event goal for the Email Link Click with the Goal Details as below. 

4. Create a second event goal for the Phone Link Click as below:


Scroll Depth

1. Create a trigger in GTM as below. The numbers are arbitrary (you can put whatever you want here) but as a default you can use 25, 50, 75, 90. 

2. Create the tag as below:

3. In Analytics, create an event goal as below. For example, this will fire the goal when a person scrolls down to 75% of a page - you can make this number any number from the ones you put into the GTM trigger above.

Time on site

1. This goal only needs to be set up in Google Analytics and should be set up as below. Again the length of time you want to set as a goal is up to you but 2 minutes can be a default option. Use any current analytics data to inform you of a good goal time if need be.