With Google Analytics 4, we’re able to leverage default events to track specific activity happening on our clients vacation rental websites.
Types of events to track in Google Analytics 4 #
Non-standard events we’d like to track.
Searched for properties: #
The ‘search’ event in Google Analytics 4 is a way to track when a user on a website initiates a search. In your case, you want to fire the ‘search’ event when a guest on your client’s website searches for dates and arrives at a search results page.
To implement this event tracking, you will need to set up a trigger that fires the ‘search’ event when a specific user action occurs. In this case, the trigger would be set up to fire the ‘search’ event when a user submits a search query on the website. You can use Google Tag Manager to set up this trigger and track the event.
Viewed PDP (property detail page): #
Started checkout process: #
Add To Cart code to go with begin checkout
gtag("event", "add_to_cart", { currency: "insert currency ex: USD", value: insert total value, items: [ { item_id: "insert property id", item_name: "optional: insert property name" } ] });
Purchase (with revenue) basic example: #
Code example for a Purchase event in Google Analytics 4
Purchase Google Analytics 4 event code example:
gtag("event", "purchase", { currency: "insert currency ex: USD", value: insert total value, items: [ { item_id: "insert property id", item_name: "optional: insert property name" } ] });
Purchase (with revenue) detailed with fees example: #
<script> gtag("event", "purchase", { currency: "USD", value: insert gross booking value (SUM all of the items below), tax: insert tax amount, items: [ { item_id: "insert the property ID of the property here", item_name: "insert the property name here", price: insert TOTAL rent here, quantity: insert the number of nights booked }, { item_name: "cleaning fee", price: insert the cleaning fee amount }, { item_name: "damage waiver fee", price: insert the damage waiver fee amount }, { item_name: "facilities fee", price: insert the facilities fee amount }, { item_name: "hot tub fee", price: insert the hot tub fee amount }, { item_name: "processing fee", price: insert the processing fee amount } ] }); </script>
Standard events we’d like to track.
All of these events should fire with a standard Google Analytics 4 install. Doc from Google on how these events fire here.
- click
- file_download
- first_visit
- form_start
- form_submit
- page_view
- scroll
- session_start
- user_engagement
- video_complete
- video_progress
- video_start
- view_search_results