gtag.js Tracking
We do have a GDPR compliant opt-in for tracking - tracking only starts once the user accepted tracking cookies.
event_name = 'page_view' page_title = one of the following values
- home
- roomcount
- roomselect
- rateselect
- contact
- payment
- summary
- confirmation
On page roomselect the event view_item_list will be triggered with the following parameters:
- items
- id = ROOM_TYPE_ID
- name = ROOM_TYPE_NAME (in the displayed language)
- list_position = position on the screen (0 indexed)
- category = 'RoomType'
On page rateselect the event view_item will be triggered with the following parameters:
- items
- id = room type id
- name = room type name (in the displayed language)
- category = 'RoomType'
On page summary the event begin_checkout will be triggered with the following parameters:
- id = ROOM_TYPE_ID/RATE_PLAN_ID
- name = ROOM_TYPE_NAME / RATE_PLAN_NAME
- list_position = room request number (0 indexed)
- category = 'Product'
- price = total amount including all taxes and surcharges
On page payment the event purchase will be triggered with the following parameters:
- transactionId = CONFIRMATION_CODE
- value = total amount of all rooms including all taxes and surcharges
- currency = currency code (defaults to hotels primary currency)
After the purchase event the user is redirected to the summary page
- event = session_start
- page_view page_title = home
- page_view page_title = roomcount
- page_view page_title = roomselect
- page_view page_title = rateselect
- page_view page_title = contact
- event = begin_checkout
- event = purchase
In case you are not using Google Analytics 4, but instead using Universal Analytics (or any older version of Google Analytics) you may require the following information to configure your conversion goals and/or funnel steps.
While Google Analytics 4 does rely on page_title, older versions of Google Analytics do use the page_path instead.
For compatability reasons we have opted to use the page_title prefixxed with a / character as the page_path. Meaning if the page_title is home the page_path will be /home.
While Google Analytics 4 does rely on event_action, older versions of Google Analytics do also require an event_category. In the following section we have listed the even_category for the most important events.
Event Category: engagement Event Action: view_item_list
Event Category: engagement Event Action: view_item
Event Category: ecommerce Event Action: add_to_cart
Event Category: ecommerce Event Action: begin_checkout
Event Category: ecommerce Event Action: checkout_progress
Event Category: ecommerce Event Action: purchase