In order to set up Google Analytics tracking, you need:
- a Google Tag Manager account
- a Google Analytics account
Important: You need to have the same Google Tag Manager container on your website and inside your booking widget. Please get in touch with our customer support so we can install it for you. You have to request the installation of Google Tag Manager.
Steps in Google Tag Manager
1. Create a Custom Event trigger
All the steps in the booking process have the same event name. The name is “event-to-ga”. Therefore, the Custom Event trigger of your tag must be “event-to-ga”. This trigger will work in both scenarios (page or iframe).
2. Add the variables from the Data Layer
Before creating your tag, you need to make sure that you can use the variables below which come from the data layer. To do this, you need to go to Variables and add the following User-Defined Variables (Data Layer Variables).
3. Create a Google Analytics Event Tag
In Google Tag Manager, go to Tags and create a new Google Analytics Event Tag. Add the different DataLayer variables you just created to your Google Analytics Event Tag.
Note: You need to use the variable which corresponds to the total amount of revenue tracked at the end of the booking process.
Under Triggering, add the Custom Event trigger you created before.
4. Create a Custom HTML tag for the Data Layer push
Now we have to create a new Custom HTML tag that will update the variable with the correct amount. Since the variable is in cents, it has to be divided by 100 before it is sent to Google Analytics.
Don’t forget to add the trigger you created for your Google Analytics Event tag.
4. Enable Cross Domain Tracking in your Google Analytics variable
Since the booking widget and your website are not located on the same domain, you need to enable Cross Domain Tracking inside your Google Analytics variable. Go inside your Google Analytics variable and adjust settings as described below:
Cross Domain Tracking / Auto Link Domains:
5. Create a Conversion Linker tag
The last step is to create a Conversion Linker tag. For more information about Conversion Linker, please visit Google Ads Help Center:
The trigger for the Conversion Linker is the trigger you created in step 1: "event-to-ga" + "All Page Views"
Steps in Google Analytics
1. Create an Event Goal
Now you need to create a Goal in Google Analytics to trigger the successful completion of the booking process.
All the event names are the same for both scenarios (page or iframe), except for the eventAction:
- page: eventAction: “Widget(page)”
- iframe: eventAction: “Widget(iframe)”
If you want to create one Goal for both scenarios, you need to trigger both scenarios. Alternatively, you can also create one Goal for each scenario.
Fill in the fields as follows to set up a common Goal for both scenarios (page and iframe):
- Category / Equals to / Booking
- Action / Begins with / Widget
- Label / Equals to / booking-success
- Value / Greater than / Value
Use the event value as the Goal Value for the conversion: YES
2. Check the marketing source
Once you've created a Goal and received some conversions, you can check the conversion sources under Conversions > Goals > Overview.
Important: In order to get the right conversion source for non Google Ads campaigns, you always need to add UTM parameters at the end of your URL!