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

    • Analytics

      You can view the tripla Analytics dashboard from the link below.
    • Subdomain Setup for Reservation Widget

      Here is some basic information and important notes regarding subdomain setup for the reservation widget. What Is a Subdomain? A subdomain is used to divide a single domain into multiple segments for different purposes. As the number of websites you ...
    • First-Party Cookie Settings

      If you are switching to the iframe-based subdomain, it is recommended to configure the first-party cookie settings before setting up the subdomain. If the subdomain is set up first and the first-party cookie setting is not yet complete, a popup ...
    • Booking Widget URL Parameters When Using a Subdomain

      URL parameters refer to variables (strings) added to the end of a URL. By placing links with specific URL parameters on your website, you can launch various views of the reservation widget. If you're using a custom subdomain for your reservation ...
    • Integration of "tripla Book" with Google Hotel Ads

      tripla Book can be integrated with Google Hotel Ads, a hotel search web advertising service provided by Google. When travelers search for hotels on Google's search engine or Google Maps, it is possible to display the hotel’s own information (such as ...