Google Cross Domain Tracking

Track guests across your website and your Beds24 booking page as one visit by setting up cross domain tracking with Google Tag Manager. Use this when your booking page runs under your own domain.

Required skills: HTML and a Google Tag Manager account.

Quick Guide

  1. Create a Google Tag Manager account and a Web container.
  2. Add the Tag Manager code to Settings > Booking Engine > Property Booking Page > Developer.
  3. Add the noscript code to a content field in Settings > Booking Engine > Property Booking Page > Content.
  4. In Tag Manager, create a Pageview tag with cross domain tracking for beds24.com and publish it.

Table of Contents

  1. Create a Google Tag Manager account
  2. Add the Tag Manager code to your booking page
  3. Set up the tag in Google Tag Manager

Create a Google Tag Manager account

Steps:

  1. Go to Google Tag Manager and create an account.
  2. In Add New Account, enter:
    • Account Name: for example, Beds24.
    • Country: your country.
  3. Under Container Setup, enter:
    • Container Name: for example, www.beds24.com.
    • Target Platform: Web.
  4. Click Create and agree to Google's Terms of Use.

Add New Account form in Google Tag Manager

Add the Tag Manager code to your booking page

Steps:

  1. Go to Settings > Booking Engine > Property Booking Page > Developer.
  2. Under Advanced HTML Settings, paste your Tag Manager code into Insert in HTML <HEAD>. Example:
    <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','GTM-123456');</script>
  3. Paste the second Tag Manager code, which belongs right after the opening <body> tag, into the source code of any content field in Settings > Booking Engine > Property Booking Page > Content. Example:
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-123456"
    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  4. Save your changes.

Note: these codes are examples only. Use the codes Google Tag Manager gives you for your own container.

Set up the tag in Google Tag Manager

Steps:

  1. On the Workspace Overview screen, click New Tag.

    New Tag on the Workspace Overview screen

  2. Click Tag Configuration and choose Universal Analytics.

    Tag Configuration menu

    Universal Analytics tag type

  3. Set Track Type to Pageview.
  4. Create a new Google Analytics Settings variable and enter your Tracking ID, for example UA-12345678-9.
  5. Click More Settings > Cross Domain Tracking.
  6. Under Auto Link Domains, enter beds24.com and click Save.
  7. Click Triggering and choose All Pages, or the trigger that fits your setup.

    Triggering settings with All Pages

  8. Click Save, then Submit and Publish.

Expected result: visits that move from your website to your booking page are tracked as one session.

Related Articles

Was this article helpful?
0 out of 0 found this helpful

How to Contact us :