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:

image-20231108101207895


2. Create Event Trigger

Create the following trigger that will execute when the widget submit button is clicked.


image-20231108112648237


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.).

image-20231108113726570


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

  1. Log in to Google Analytics 4 web interface
  2. Go to Admin > Data Display > Custom Definitions
  3. Ensure the 'Custom dimensions' tab is selected
  4. Click 'Create custom dimension' button
  5. Enter dimension details as shown below
  6. Repeat for both parameters ('action' and 'selection')

image-20231108114037110