Google Analytics 4 is an analytics service that helps you better understand your web traffic. You can link it to the Mews Booking Engine to gain insight on conversion rates, user engagement and more. It lets you track all Mews Booking Engine events.
If you want to see your transactions and e-commerce, you only need to set up Google E-commerce. Google E-Commerce lets you track sales in the Mews Booking Engine to help you streamline booking management.
In this article you can learn about:
Pre-requisites
This set up requires that you connect your Google tag manager account to Mews beforehand. You also need to create a Google Analytics account.
Note: Remember to note down the Measurement ID in your Google Analytics account. You need it to create your tags later.
To set up GA4 and Google E-commerce
Step 1: Create your triggers
You can use triggers to choose events to activate the Google Analytics tracking in the booking engineMews recommends that you create a general trigger that activates tracking whenever there is an occurrence in the booking engine that uses '^ga4'. This way you do not need to set up triggers for multiple events. To set up triggers for specific events, refer to this list of events.
To create your trigger:
- Open Google Tag Manager and click your account.
- Click Triggers and then click New.
- Rename "Untitled trigger" as "All GA4 Events". Note: If you are creating a trigger for a more specific event, choose an appropriate name.
- Click Trigger configuration > Custom event.
- Under Event name, enter “^ga4”. Note: If you are creating a trigger for a more specific event, choose from this list of custom trigger events.
- Check the Use regex matching box.
- Click This trigger fires on All Custom Events.
-
Click Save.
Step 2: Create your tags
You can use tags to allow Google Analytics to track user behavior in the Mews Booking Engine. The tags collect information on events such as clicks, page views and more so Google Analytics can analyze them.
To set up Google Analytics 4
I. Create variables
- Open Google Tag Manager > Variables.
- Under User-defined Variables, click New.
- Rename "Untitled variable" as "GA4 Event name".
- Click Variable configuration > Data layer variable.
- For Data layer variable name, enter "eventName" and click Save.
- Under User-defined Variables, click New.
- Rename "Untitled variable" as "GA4 Pageview location".
- Click Variable configuration > Data layer variable.
- For Data layer variable name, enter "page_location" and click Save.
- Under User-defined Variables, click New.
- Rename "Untitled variable" as "GA4 Pageview title".
- Click Variable configuration > Data layer variable.
- For Data layer variable name, enter "page_title" and click Save.
II. Create the tag
- Open Google Tag Manager > Tags > New.
- Rename "Untitled tag" as "Google Analytics 4".
- Click Tag configuration > Google Analytics > Google Analytics: GA4 Event.
- Under Measurement ID, enter the Measurement ID you noted when in Step 3 when creating your Google Analytics account.
- Under Event Name, click Add variable
> GA4 Event name.
- Under User Properties, click Add row. Fill in the following details:
- Property Name: Enter “Page Title”.
- Value: Enter “{{GA4 Pageview title}}” or select the correct variable after clicking Add variable
.
- Click Add Row. Fill in the following details:
- Field Name: Enter "Page Location”.
- Value: Enter “{{GA4 Pageview location}}” or select the correct variable after clicking Add variable
.
- Click Triggering section > All GA4 Events.
- Click Save.
To set up Google E-Commerce
I. Create the trigger
- Open Google Tag Manager > Trigger > New.
- Rename “Untitled Tag” as “All GA4 e-Commerce Events”. Note: If you are creating a trigger for a specific event, choose an appropriate name.
- Click Trigger Configuration > Custom Event.
- Under Event name, enter the event name, for example, “^view_item_list|^view_item|^select_promotion|^add_to_cart|^remove_from_cart|^begin_checkout|^add_payment_info|^purchase.” Note: If you are creating a trigger for a more specific event, choose from this list of custom trigger events.
- Check the Use regex matching box.
- Click This trigger fires on All Custom Events.
- Click Save.
II. Create the tag
- Open Google Tag Manager > Tags > New.
- Rename "Untitled Tag" as "E-Commerce GA4".
- Click Tag Configuration > Google Analytics > Google Analytics: GA4 Event.
- Under Measurement ID, enter the Measurement ID you noted in Step 3 when creating your Google Analytics account.
- Under Event Name, click Add variable
> Event.
- Under More Settings, check the Send Ecommerce data box.
- Under Data source, click Data Layer.
- Click Triggering > All GA4 e-Commerce Events.
- Click Save.
Note:
- You can monitor your GA4 events from the Google Analytics real-time dashboard.
- E-commerce events take 24 hours to show revenue amounts.
You can repeat these steps for every event you want to track. You can refer to this list of possible events.
You can learn more about Google Tag Manager here.