Skip to content
  • There are no suggestions because the search field is empty.

How do I set up GA4 tracking with Cookiescript on my website and booking engine via Google Tag Manager?

Please find attached the following GTM containers:

How to use the container

Smart Hotel Base Container with GA4 With Cookiescript

  1. In Google Tag Manager (https://tagmanager.google.com/), navigate to the relevant account > admin > import container.
  2. Choose the GA4 container attached to import into your existing workspace
  3. Choose Merge under import options.
  4. Fields to update
    • Variable: GA4 ID – Insert your existing Google Analytics – GA4 ID, or abandon this change if you were using the same variable before.
    • Variable: Cookiescript URL – Insert your existing Cookiescript URL into this variable. You can find this URL in your Cookiescript Account by visiting the "Install" page. The URL that you are looking for starts with https://cdn.cookie-script.com
    •  
  5. Before publishing the container, again, navigate to the admin > Container Settings > Enable consent overview and Save.
  6. Publish the container
  

Mandatory Cross Domain Tracking for GA4 Setup

  1. Enter https://analytics.google.com/ and choose your Google Analytics Account and then GA4 Property

  2. Click on the Admin button located at the bottom of the left-hand nav menu

  3. Choose Data collection and modification, and then select Data Stream

  4. Select your data stream

  5. Click on Configure Your Tag Settings and "Configure your domains". In the list, ensure your website domain and Smart Hotel booking engine domain are added with "Contains" match type.

  6. Leave this page and click on Show More. Then, click on "List Unwanted Referrals". Again, ensure your website domain and Smart Hotel booking engine domain are added with "Referral domain contains" match type.

Optional for GA4 Setup

  1. Enter https://analytics.google.com/ and choose your Google Analytics Account and then GA4 Property

  2. Click on the Admin button located at the bottom of the left-hand nav menu

  3. Choose Custom Definitions under Property Settings

    1. Choose Create custom dimensions (this will be to track the link_url parameters of the click (outbound clicks), tel_link_click (telephone clicks), mail_link_click (mail clicks) events)

      • Dimension Name: link_url
      • Scope: Event
      • Description: Link URL
      • Event Parameter: link_url
      • Save
  4. After this setup, you will be able to use the link_url Custom Dimension on your Custom Exploration Reports.