Browse docs
On this page

Setting Up Google Analytics and Google Tag Manager

Configure Google Analytics, Google Tag Manager, and Google Ads conversion tracking for a Vally booking website.

Playback speed: 1×

This guide will help you set up Google Analytics and Google Tag Manager to ensure accurate tracking of your users activity, and then link Google Ads so results and conversions are shared across both platforms.

Step 1) Google Analytics 4 (GA4):

Google Analytics helps us understand how people use your website and if they complete actions like bookings. We will create an account, get the Measurement ID, and later connect it with Google Ads so data can flow between the two platforms.

New Accounts

  1. Go to analytics.google.com and sign in.
  2. Click +Create and select Account.
    • Google Analytics setup, step 1
  3. Enter an Account Name (We recommend using your business name, example: Peacock Adventures).
    • Google Analytics setup, step 2
  4. Configure data-sharing settings (we recommend unchecking all). Click Next.
  5. In Property details:
    Google Analytics setup, step 3
    • Enter a Property Name.
    • Set Time Zone.
    • Select Currency.
    • Click Next.
  6. Set up Business details and objectives:
    • For Industry category, select Travel.
    • Select Business size.
    • Click Next.
  7. Set up a Data Stream:
    Google Analytics setup, step 6
    • Select Web.
    • Enter the site URL and site Name. Google Analytics setup, step 7
    • Click Create & Continue.
  8. Property creation will be finished. Click the property to display the Measurement ID (GA4 tag).
    • Write down the Measurement ID to use later.
      • Google Analytics setup, step 9

Existing Accounts:

  1. Go to analytics.google.com and sign in.
  2. In the left menu, click Admin.
    • Google Analytics setup, step 10
  3. Under Data Collection and Modification, click Data Streams.
    • Google Analytics setup, step 11
  4. Click the property to display the Measurement ID.
    • Write down the Measurement ID to use later.
    • Google Analytics setup, step 9

Add Vally and Your Business Domains

Cross-linking domains allows us to avoid counting the same visitor twice and to keep their session active when they move between your site and your Vally booking page, so conversions are tracked correctly.

  1. Go to Admin.
    • Google Analytics setup, step 10
  2. Under Property, click Data Streams and select your web data stream.
  3. In the stream settings, click Configure tag settings.
    • Google Analytics cross-domain settings, step 2
  4. Click Configure your domains.
  5. Under Include domains that match the following conditions:
    • For the first condition, set Match type to Contains and enter vallypro.com.
    • Click Add condition.
    • For the second condition, set Match type to Contains and enter your business website domain.
    • Cross-domain configuration with Vally and business website domains
  6. Click Save.

Step 2) Google Tag Manager (GTM):

Google Tag Manager is where we manage tracking codes so your website can send information to Google Analytics. Vally provides a ready-to-use file (called “container”) with the important tags already configured.

New accounts:

  1. Go to tagmanager.google.com and sign in.
  2. Click Create Account, then fill in the Account Name and select the Country.
  3. On Container Setup:
    • In Container Name, type the website domain.
    • In Target Platform, select Web.
    • Click Create.
      • Google Tag Manager code snippet, step 1
  4. Two code snippets will be created. These two codes need to be added to your website:
    • First snippet: Must be pasted on the <Head> of your page.
    • Second snippet: Must be pasted on the <body> of your page.
      • Google Tag Manager code snippet, step 2

If you’re an existing account and already have the Snippets installed, jump to the next step.

Import Vally’s Container

To track bookings, we need to add events such as “add to cart”, “begin checkout” and “purchase” so that Google Analytics registers the key conversion actions. The Vally container file already includes these events, along with a GA4 Google tag and a Cross-Domain Linker tag.

How to do it:

  1. Go to tagmanager.google.com and sign in.
  2. In the top left menu, click Admin.
    • Vally Google Tag Manager container setup, step 1
  3. Under the Container menu, click Import Container. A new window will show up:
    • Vally Google Tag Manager container setup, step 2
    • Open the Vally Tag Manager import file and click Download in Google Drive.
    • Click Choose container file and select the import file.
    • On import options:
      • If you previously imported a Vally container, follow Update a container you already imported instead.
      • If this is your first Vally import and this GTM container has no existing setup to keep, select Overwrite.
      • If this GTM container has other setup to keep, select Merge. Review the detailed changes before confirming, especially any tags or variables GTM would replace or rename.
    • Wait for the import to complete, then close the window.
    • In Tags, open the GA4 Google tag. Under Configuration settings, confirm that cookie_flags is set to SameSite=None;Secure.
  4. In the left menu, click Variables.
    Vally Google Tag Manager container setup, step 3
    • Scroll down to User-Defined Variables and click GA4.
      • Vally Google Tag Manager container setup, step 4
    • Click on G-YOURIDHERE and replace it with your Measurement ID (G-XXXXXX).
      • Vally Google Tag Manager container setup, step 5
    • Click Save.
  5. Click Submit.
    • Vally Google Tag Manager container setup, step 6
  6. Click Publish.
    • Vally Google Tag Manager container setup, step 7
  7. Click Continue to finish.

Saving or importing a container does not update your live site until you publish it.

Update a container you already imported

If you already imported an earlier Vally container, update its GA4 Google tag using the small update file below. This file does not include the GA4 variable that holds your Measurement ID. If you have customized the GA4 tag, use the manual instructions below to keep those settings.

Update with the import file

  1. In Google Tag Manager, open your existing container and click Admin.
  2. Under Container, click Import Container.
  3. Open the Vally GA4 cookie flags update file, click Download in Google Drive, then select the downloaded file in Choose container file.
  4. Choose your workspace. Select Merge, then Overwrite conflicting tags, triggers, and variables. In the import preview, confirm that GA4 is the only item listed and is marked Modified, with 0 Added and 0 Deleted. If anything else appears, cancel the import.
    • GTM import preview showing Merge, overwrite conflicting items, and only the GA4 tag modified
  5. Click Add to workspace.
  6. In Tags, open the GA4 Google tag. Under Configuration settings, confirm that cookie_flags is set to SameSite=None;Secure.
    • GA4 Google tag with cookie_flags set to SameSite=None;Secure
  7. In Variables, open the user-defined GA4 variable and confirm that its value is your Measurement ID (G-...). If it is different, replace it with your Measurement ID and click Save.
  8. Click Submit, then Publish to make the update live.

Update manually

  1. In Google Tag Manager, open Tags and select the GA4 Google tag.
  2. Under Configuration settings, add cookie_flags with the value SameSite=None;Secure. If the setting is already there, keep one row with that value. Leave your other settings in place.
  3. Click Save.
  4. Click Submit and Publish to make the change live.

Step 3) Add your GTM tag to your Vally’s business

  1. Go to Google Tag Manager and copy your GTM container ID.
  2. Log in to your account in Vally Portal and go to the Business Settings page.
  3. Scroll down to Advanced Settings and expand it.
  4. In Google Tag Manager ID, paste your GTM container ID and click Update.
    • Vally Google Tag Manager container setup, step 8

By linking Google Analytics 4 with Google Ads, you enable data sharing between the two platforms, allowing Analytics data to be used in Google Ads, and vice versa.
Note: Make sure you are signed in both your Google Analytics and Google Ads account.

  1. Go to: Admin > Product Links > Google Ads Links.
    Google Ads connection, step 2
    • Click Link.
      • Google Ads connection, step 1
    • Click Choose Google Ads Accounts.
      • Google Ads connection, step 3
    • Select the desired account.
    • Click Confirm.
  2. Configure your settings:
    • Google Ads connection, step 4
    • Enable Personalized Advertising.
    • Enable Auto-Tagging.
    • Allow access to Analytics.
    • Click Next.
  3. Review the settings and click Submit.

Your account will now be linked to your Google Ads.


Step 5) Check booking popup tracking

After configuring the GTM container in Step 2 and saving its ID in Vally Portal in Step 3, check tracking on both your website and your direct Vally booking page.

  1. In your GTM Workspace, click Preview. In Tag Assistant, enter the URL of the page with your booking popup and click Connect. When your site opens, return to the Tag Assistant tab and click Continue.
  2. On your site, accept analytics cookies if prompted. Open the desktop booking popup, view an activity, add it to the cart, and open the cart.
  3. In Tag Assistant, open Summary → Tags and check Tags Fired. Confirm that View Item, Add To Cart, and View Cart appear.
  4. Under Summary → Output → Hits Sent, confirm that the GA4 hits go to your Measurement ID.