Lodgix.com Manuals & Tutorials

Tracking Scripts

You can enter your Google Analytics tracking code into Lodgix to track visitors and conversions on your booking page. This requires a bit of configuration and is more complicated than simply copying and pasting your tracking script. You will most likely want to monitor the analytics of your booking pages within the same account as that of your primary website. This is called cross domain tracking. Additionally, you will want to setup goals within Google Analytics to track conversions. This is all explained in detail below.

Add Tracking Script to Lodgix

You can paste your tracking script into Lodgix under Settings > Important Settings > Bookings.

Setup Cross Domain Tracking

Modify Script to Allow Cross Domain Tracking - Your Website

You must modify the script on your website and within Lodgix to allow the same analytics account to track both websites. Follow the steps below for the tracking script that is installed on your website.

Find the "config" line in the snippet, it looks like this:

gtag('config', 'GA_TRACKING_ID');

Modify the snippet as shown below:

gtag('config', 'GA_TRACKING_ID', {

'linker': {

'domains': ['lodgix.com']

}

});

Remember to replace the example tracking ID (GA_TRACKING_ID) with your own tracking ID.

Modify Script to Allow Cross Domain Tracking - In Lodgix

Follow the steps below for the tracking script that is installed in Lodgix.

Find the "config" line in the snippet. Modify the snippet as shown below:

gtag('config', 'GA_TRACKING_ID', {

'linker': {

'accept_incoming': true

}

});

Remember to replace the example tracking ID (GA_TRACKING_ID) with your own tracking ID.

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.

Setup a Goal

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.

Goal Setup

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).