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
- Create a Google Tag Manager account and a Web container.
- Add the Tag Manager code to Settings > Booking Engine > Property Booking Page > Developer.
- Add the
noscriptcode to a content field in Settings > Booking Engine > Property Booking Page > Content. - In Tag Manager, create a Pageview tag with cross domain tracking for beds24.com and publish it.
Table of Contents
- Create a Google Tag Manager account
- Add the Tag Manager code to your booking page
- Set up the tag in Google Tag Manager
Create a Google Tag Manager account
Steps:
- Go to Google Tag Manager and create an account.
- In Add New Account, enter:
- Account Name: for example, Beds24.
- Country: your country.
- Under Container Setup, enter:
- Container Name: for example, www.beds24.com.
- Target Platform: Web.
- Click Create and agree to Google's Terms of Use.
Add the Tag Manager code to your booking page
Steps:
- Go to Settings > Booking Engine > Property Booking Page > Developer.
- 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> - 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> - 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:
- On the Workspace Overview screen, click New Tag.
- Click Tag Configuration and choose Universal Analytics.
- Set Track Type to Pageview.
- Create a new Google Analytics Settings variable and enter your Tracking ID, for example UA-12345678-9.
- Click More Settings > Cross Domain Tracking.
- Under Auto Link Domains, enter
beds24.comand click Save. - Click Triggering and choose All Pages, or the trigger that fits your setup.
- Click Save, then Submit and Publish.
Expected result: visits that move from your website to your booking page are tracked as one session.