GA4 Implementation Steps

Google Tag Manager Configuration

The following steps outline a basic GA4 implementation for tracking pageview activity plus core ecommerce events: view item, begin checkout, and purchase. Please contact Ripe for tracking additional attributes and events.


1. Create Ecommerce Trigger

Alternatively, you can create separate triggers for each event and add the three individual triggers to the ecommerce tag in the step 3 below.


2. Create GA4 Configuration Tag

This step is only required if an existing configuration tag is not already set up, or if you prefer to have a separate configuration tag for the lodging site. If multiple configuration tags are used, then create a page trigger for the lodging site instead of using the 'All Pages' trigger as shown below.


Step 3: Create Ecommerce Tag

All attributes are populated in the latest GA4 data layer structure and do not need to be added manually.


Data Layer Reference

Data layer details are provided below for reference. The structure matches the latest GA4 specifications and does not require any manual mapping.


Property View

 event: 'view_item',
    ecommerce: {
      items: [
      {
        item_id: [Property ID],
        item_name: [Property Name],
      }]

Checkout

event: 'begin_checkout',
ecommerce: {
  items: [
  {
	item_id: [Property ID],
	item_name: [Property Name],
	item_variant: [Room Type]
  }]

Purchase

event: 'purchase',
ecommerce: {
  transaction_id: [Order ID],
  affiliation: [Affiliation],
  value: [Total Reservation Amount],
  currency: [Currency Code],
  coupon: [Coupon Code],
  items: [
  {
	item_id: [Product ID],
	item_name: [Product Name],
	currency: [Currency Code],
	index: 0,
	item_variant: [Room Type],
	price: [Room Amount],
	quantity: [Quantity]
  }]
}