Google Analytics Settings for Subdomain

Google Analytics Settings for Subdomain

For users utilizing the subdomain feature, we provide guidance on measuring traffic sources using Google Analytics cross-domain tracking.
Warning
The GA (Universal Analytics) described on this page was discontinued as of June 30, 2023.
Please check the settings for GA4 going forward.
Alert
This setup method is not guaranteed by tripla and is provided only as an example of using Google Analytics.
Please contact Google Support for any questions regarding Google Analytics settings.

Entering the Google Analytics Tracking Code

Install the same Google Analytics tracking code used on your main website with tripla Book on the subdomain as well.
In Universal Analytics, go to Admin → Tracking Info → Tracking Code, and copy the tracking code.
※The setup process is different for GA4.


In the tripla facility management screen, navigate to Settings → Widget Settings → Settings, enter your Google Analytics tracking code in the Custom Tag field, and then click Save.


Google Analytics Display Settings

By default, Google Analytics does not display the domain name; it only shows the path of the page.
For example, if the URL is https://www.tripla-ryokan.com/privacy, Google Analytics will show only /privacy and the domain name will not be visible.

This makes it unclear whether the traffic is coming from the accommodation site or the booking page subdomain.
To solve this, you need to configure Google Analytics to display the domain name.

In Google Analytics, go to Admin → Filters, then click + Add Filter.
Enter a filter name such as “Add Referrer Domain”.
Set the filter type to Custom > Advanced.
Field A -> Extract A: Select Hostname and enter (.*).
Field B -> Extract B: Select Request URI and enter (.*).
Output To -> Constructor: Select Request URI and enter $A1$B1.
Check Field A Required and Override Output Field, then click Save.


How to Check Referral Sources

In Google Analytics, open Behavior → Site Content → All Pages to view page views for both the accommodation site and its subdomains.
Filtering the search with "confirmation" will display URLs of the reservation confirmation pages. (The preceding numbers represent the hotel ID.)
Click Secondary Dimension and select Source/Medium to display the referral URLs on the right side of the page.
However, if users access the page directly via bookmarks or if Safari blockers or similar tools prevent referral information from being passed, "(not set) / (not set)" will be displayed.


    • Related Articles

    • Subdomain Setup for Booking Widget(BW)

      Purpose: This section is to explain basic information and key considerations regarding the use of subdomains for the booking widget. 1. What is Subdomain? A subdomain is used to divide a single domain into multiple parts for different purposes. ...
    • Analytics

      Please refer to the attached PDF for more information about the tripla Book dashboard.
    • tripla Connect Prerequisites

      Purpose: This section explains the items that must be completed in advance when implementing tripla Connect. *These tasks are primarily handled by the domain administrator. *To ensure accurate data collection and analysis, please be sure to complete ...
    • Third-Party Tracking Tags

      Purpose: This section explains how to configure third-party tracking tags. ⏱ Estimated time: ~5 mins Third-Party Tracking Tags: Third-party tracking tags allow conversion tags (for ads, analytics, etc.) to be embedded on the reservation completion ...
    • First Party Cookie Settings

      Purpose: This section is explain how to set up First-party cookie. Note: It is recommended to configure first-party cookies before setting up the subdomain. If the subdomain is set up before first-party cookies are configured, the Booking Widget may ...