GA4 Ripe Search Widget Tracking
Google Tag Manager Configuration
The Ripe booking widget is already configured to provide engagement data for widget selections and submit action. It does this by pushing information to the shared 'data layer'. Follow the instructions below to enable tracking in GA4 using Google Tag Manager. Other reporting tools can be implemented in a similar manner. Please contact Ripe for additional details.
1. Create Event Variables
Create the following custom variables if they are not already present in your GTM container:
eventCategory
eventAction
eventLabel
Repeat the steps shown below for all 3 variables:
2. Create Event Trigger
Create the following trigger that will execute when the widget submit button is clicked.
Step 3: Create Event Tag
Now create a tag to send the data to GA4. Similar steps can be repeated for other reporting and marketing tags. The 'Event Action' variable will have a values such , 'Dates Selected, 'Promo Selected', Search Submit'. The 'Event Label' variable will contain additional selection details (dates, promotion, etc.).
Step 4: Deploy Changes
Publish the above changes to enable tracking on the website
Google Analytics Configuration
After publishing the GTM changes outlined below, the event data will automatically start flowing into GA4 and be visible in event reports (using the 'Event Name' field). To report on the additional 'action' and 'selection' attributes, you need to create GA4 custom dimensions that map to the event parameters entered in the GTM tag setup. An example is shown below.
Create Custom Dimensions
- Log in to Google Analytics 4 web interface
- Go to Admin > Data Display > Custom Definitions
- Ensure the 'Custom dimensions' tab is selected
- Click 'Create custom dimension' button
- Enter dimension details as shown below
- Repeat for both parameters ('action' and 'selection')
Updated about 1 month ago