Skip to main content
All CollectionsLodgix User ManualAdditional Features
Tracking Scripts - Universal Analytics
Tracking Scripts - Universal Analytics

How to configure Google Universal Analytics to work with Lodgix

Brent Kleinheksel avatar
Written by Brent Kleinheksel
Updated over a week ago

Universal Analytics vs GA4

The instructions in this article are specific to Google Universal Analytics. If you are looking to setup Google Analytics 4 to work with Lodgix, please refer to this support article instead.

Simple Tracking

Paste your tracking script into Lodgix under Settings > Important Settings > Bookings...

This script will be added to your Lodgix booking pages and if you using our WordPress plugin, will also be passed to your website via the WordPress plugin.

Cross Domain Tracking

Most will want to monitor the analytics of your Lodgix booking pages within the same account as that of your primary website, tracking visitors as they move from your website to the booking pages on the Lodgix domain. This is called cross domain tracking.

Setup Cross Domain Tracking in Lodgix

From Settings > Important Settings > Bookings, first click the "Setup GA Cross Domain Tracking" button...

Then enter your Google Analytics Tracking ID (not the entire script)...

Two codes will be generated; one that will be inserted on the Lodgix booking pages, and another that will be inserted in the header of your website. Note this will only work if you are using the Lodgix WordPress plugin.

Add Your Domain to the Referral Exclusion List

When a user journey crosses from your first domain to your second domain, Analytics interprets that as the user having been referred by your first domain to your second domain, and Analytics creates a new session. If you want to be able to track a single session across multiple domains, you need to add your domain to the Referral Exclusion List. You can do this within Analytics from Admin > Property > Tracking Info > Referral Exclusion List.

Goal Setup

You will have to setup a Goal within Google Analytics to track conversions on your booking page. This is done from within your Analytics account under Admin > View > Goals. Click on the New Goal button and follow the steps below.

Setup a Goal

Select Custom

Goal Description

Enter a Name for your goal and select Destination as the Goal Type.

Goal Details

Set the Goal Detail as shown above. IMPORTANT - you must replace the "XXXXX" with your Lodgix User ID. This can be found under Settings > Important Settings.

Test In Real Time

You can test the script immediately after configuring it. Start by submitting a test booking through your website. Then within your Analytics account, navigate to Reporting > Real Time > Conversions. Click on the "Goal Hits (Last 30 min)" link and you should see your completed reservation (goal hit).

Ecommerce Tracking

Lodgix also sends purchase event data to Google. If you have ecommerce tracking configured in your Google Analytics account, you will automatically have the ability to track revenue from reservations.

Information about configuring Ecommerce Tracking in Google Analytics can be found here:

Did this answer your question?