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 "create" line in the snippet. For a website called example-1.com, it looks like this:

ga('create', 'UA-XXXXXXX-Y', 'example-1.com');

Modify the snippet as shown below:

ga('create', 'UA-XXXXXXX-Y', 'auto', {'allowLinker': true});

ga('require', 'linker');

ga('linker:autoLink', ['lodgix.com'] );

Remember to replace the example tracking ID (UA-XXXXXX-Y) 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 on your website.

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

ga('create', 'UA-XXXXXXX-Y', 'auto', {'allowLinker': true});

ga('require', 'linker');

ga('linker:autoLink', ['example-1.com'] );

Remember to replace the example tracking ID (UA-XXXXXX-Y) with your own tracking ID, and replace the example primary domain (example-1.com) with your own primary domain name.

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

Goal Setup

Select Custom

Goal Description

Goal Description

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

Goal Details

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