fbpx

Help Center

Get advice and help from the Bookalet team

How do I set up Google Analytics (GA4) event tracking?

To set up a goal on Google Analytics 4 (GA4) using the provided script, follow…


To set up a goal on Google Analytics 4 (GA4) using the provided script, follow these step-by-step instructions:
 
Step 1: Google site tag and tracking script
 
• Ensure the page that includes the booking form widget also includes the Google Global site tag (gtag.js)
• Add the following script to the same page within the section:
				
					
<script>
function bookalet_bookingMade(data) {
gtag('event', 'Booking Made', {
'event_category': 'Bookalet',
'value': data['total']
});
}
</script>
				
			
Step 2: Access the GA4 Admin Interface
 
• Open the Google Analytics 4 admin interface by visiting https://analytics.google.com/ and signing in with your Google account.
• Select the appropriate GA4 property where you want to set up the goal.
 
Step 3: Create a Custom Event
 
• In the GA4 admin interface, click on “Events” in the left navigation menu.
• Click on “Create Event.”
• Choose a data stream, this will usually be your GA4 property
• Click create on the right hand side of the search bar
• Enter the event name as “booking_made”
 
Step 4: Add Event Parameters
 
• In the matching conditions, fill in the details as shown below: 
• Click “Create”
 
Step 5: Mark the new event as a conversion
 
• In the GA4 admin interface, click on “conversions” in the left navigation menu.
• Click on “New conversion event”
• Name your event “booking_made” 
• Click “save”. Now every time someone makes a booking, it will be marked as a conversion.
 
Step 6: Verify the tracking is working correctly
 
• To verify that the event is tracking correctly, you can simulate a booking event using the script provided or wait for actual events to occur.
• Once events are being tracked, you can monitor the event completion data in the “events” section of the GA4 interface.
 
That’s it! You have successfully set up a goal on GA4 using the provided script. Make sure to implement the script on your website or app to trigger the “booking_made” event with the necessary parameters for accurate tracking.
 
Similar Articles
Pricing Templates

Requires a Bookalet Agent account Many Agent accounts have multiple bookables and updating availability and pricing becomes…

Owner Statements

Requires a Bookalet Agent account The Bookalet Agent account provides a means of issuing Owner Invoices to…

Arrow-up