Google Analytics & Google Tag Manager

 
Google Analytics is a free web analytics service offered by Google that tracks and reports website traffic and user behavior. It is used to collect data on visitor interactions on a website, in this case, your Dtravel Direct powered booking site. This includes metrics like page views, sessions, bounce rates, etc. It works by installing a tracking code on the pages you want to analyze, which enables Google to gather analytics data from visits to those pages. Data collected by Google Analytics can provide insights into how users find and interact with your booking site. For example, it shows referral sources, most visited pages, conversion rates, etc.

Step 1: Setup Google Analytics (GA4)

 
  1. Create a new Google Analytics Account
notion image
 
  1. Name your account (e.g. vacation rental brand name)
notion image
 
  1. Once you’ve created an account, you’ll need to create a property. You can use your vacation rental brand name again or website URL. Set your time zone and preferred currency.
notion image
 
  1. Describe your business and specify the information you’d like to report on.
notion image
 
notion image
notion image
 
  1. Now create a Data Stream. Select “Web” so that you can start collecting data from your website. Enter your self-hosted domain or Dtravel domain (if you have not yet purchased a self-hosted domain) and click “Create Stream”.
notion image
 
notion image
  1. Once you’ve created a stream you’ll be shown how to manually install GA4 on your website. Don’t worry about this as we’ll be using Google Tag Manager to send data from your website to Google Analytics. All you need here is your measurement ID.
  1. Locate your GA4 Measurement ID (it should look like “G-XXXXXXXXXX”) and copy that into your notes. We’ll be using coming back to this in a minute once we have Google Tag Manager Setup.
notion image
 
notion image
 

Step 2: Setup Google Tag Manager

 
Google Tag Manager is a tag management system created by Google that allows you to quickly and easily deploy tracking tags or snippets of code (like analytics, marketing pixels, etc) onto your direct booking site. It gives you a centralized control panel to manage multiple tags from different vendors all in one place (e.g. Google Analytics, Google Ads, Facebook Ads Pixel, TikTok Ads Pixel, etc.)
 
  1. Create a new Google Tag Manager Account
notion image
 
  1. Name your Google Tag Manager account (e.g. your vacation rental business’ brand name) and create a name for your Google Tag Manager Container. Select “Web” and continue.
notion image
 
  1. Accept the Google Tag Manager Terms of Service.
notion image
 
  1. Locate your Google Tag Manager ID and add it to the settings in your Dtravel Direct dashboard.
notion image
 
notion image
 
  1. Navigate to your Dtravel Direct Settings and paste your Google Tag Manager ID.
notion image
 
  1. Click “New Tag” in the top left hand corner.
notion image
 
  1. Name your new tag “Google Tag | GA4 | Page View”
notion image
 
  1. Click “Tag Configuration” and select “Google Tag”
notion image
 
notion image
 
  1. Now we need to locate our GA4 Measurement ID. If you didn’t save it in your notes then you can locate it within your data stream by heading back to Google Analytics GA4.
 
  1. Click the gear icon to access your GA4 “Settings” in the bottom left hand corner. Then click “Data streams” under Property settings inside the “Data collection and modification” block.
 
notion image
 
  1. Click “Web” and then click on your data stream. Once you’ve accessed your data stream, copy the GA4 Measurement ID.
notion image
 
notion image
 
  1. Now head back over to Google Tag Manager and click the plus sign next to the Tag ID input field. Note: Instead of simply pasting the GA4 Measurement ID into the Tag ID field, we’re going create a variable so that you won’t have to copy and paste the GA4 Measurement ID every time you want to create a new Tag.
 
notion image
 
  1. Now click the plus sign in the top right hand corner.
 
notion image
 
  1. Name the variable “GA4 Measurement ID”. Now select “Variable Configuration” and then scroll down and select “Constant”.
 
notion image
 
  1. Paste your GA4 Measurement ID as the value and click save.
 
notion image
 
  1. Now we need to select a trigger for your tag. Select the “Initialization - All Pages” trigger. This will fire your tag on all pages of your booking site before any other tags.
 
notion image
 
notion image
 
  1. Now click “Save” in the top right hand corner.
 
  1. In order to send booking details to GA4, we’ll need to add another tag. To do this, we’ll use Google’s E-commerce events. Click on “New” to create a new tag.
 
notion image
 
 
  1. Create a new tag and name it “Google Tag | GA4 | Bookings”. Then click tag type and select “Google Analytics: GA4 Event” again.
 
notion image
  1. For the Measurement ID we can use the variable we created earlier on in this tutorial. Click the “plus” icon next to Measurement ID and select “GA4 Measurement ID”.
 
notion image
 
  1. Now click the “plus” icon next to Event Name and select “Event”.
 
notion image
 
  1. Click on “More settings” and select “Send Ecommerce data”.
 
notion image
 
notion image
 
  1. Next, click on Triggering and select the blue “plus” icon in the top right hand corner to create a new trigger.
 
notion image
 
notion image
 
  1. Name your event “GA4 Booking Events” and click on “Trigger Configuration”.
 
notion image
 
  1. Scroll down and select “Custom Event”.
 
notion image
 
  1. Add this string of events to the event name: view_item|view_item_list|select_item|add_to_cart|remove_from_cart|view_cart|begin_checkout|add_payment_info|add_shipping_info|purchase
 
  1. Next tick the “regex matching” box and click save in the top right hand corner.
 
notion image
 
  1. Click “Save” in the top right hand corner for the trigger and click “Save” again for the tag. Now we’re going to Preview the tags.
 
notion image
 
  1. Lets now test that both the Tags are firing correctly, by clicking “Preview” in the top right hand corner.
 
notion image
 
  1. Add your website URL and then click “Connect”
 
notion image
 
  1. Your direct booking site should load in a new tab.
 
notion image
  1. Click through to different parts of the page and try making a test booking to ensure conversion events are tracking properly.
 
notion image
 
notion image
 
  1. Try running a test conversion to make sure GA4 is able to read booking conversion data from your direct booking site.
 
notion image
 
notion image
 
  1. Once you’ve finished completing the test booking, head back over to Google Tag Manager to take a look at the data that has been recorded.
    1. notion image
       
  1. Click through the different events to get an understanding of the data new you’ll be sending to GA4 through the Page View and Booking tags we created.
 
notion image
 
notion image
 
  1. If everything looks like it is working properly, exit out of the Google Tag Manager Debugger and click “Submit” in the top right hand corner of the Tag Manager Overview page.
 
notion image
 
  1. Name the submission and click “Publish”.
 
notion image
 
  1. Nice work! You’re now sending website traffic data to GA4 using Google Tag Manager. Using GA4’s built in reports, you can see where website traffic is coming and which of these sources lead to a conversion!
  1. Visit your Google Analytics GA4 dashboard to start familiarizing yourself with some of the built-in reports or begin creating your own.
  1. In a later tutorial, we’ll show you how you can create tags for both Google Ads and Facebook Ads with Google Tag Manager, enabling you to manage all of your Google Analytics GA4 data inputs in one place.