Support Center

Integrating Google Analytics Classic

Last Updated: Oct 26, 2016 02:17PM EDT
DEPRECATION NOTICE: Please note that Google Analytics considers the Classic implementation (ga.js) as legacy.  If it recommending clients to use the new Google Analytics Universal Implementation (analytics.js).

If you currently have the choice to support Classic or Universal, it is best to choose Universal.  If you're website is already using the Classic implementation it is still okay to follow these instructions

Step 1: Integrate Google Analytics Classic with your website and enable cross domain tracking

Add the following block of code to every page of your website.  It should be placed right before the </head> tag. Please make sure to replace UA-XXXXX-X with your web property ID and replace YOUR-DOMAIN-GOES-HERE.com with your domain name (do not include www.)

<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _gaq.push(['_setDomainName', 'YOUR-DOMAIN-GOES-HERE.com']);
  _gaq.push(['_setAllowLinker', true]);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>

Additional Information about Cross Domain Tracking

If you or your webmaster are creating custom experiences to integrate with the Booking Engine, then you may have to implement other solutions to solve cross domain tracking. Please refer to Google's Documentation on tracking multiple domains.

Step 2: Update all links to the Booking Engine

In order to inform Google Analytics that the user is about to enter the Booking Engine, Google requires any link to the Booking Engine use the following format:
<a href="https://secure.thinkreservations.com/MY_BUSINESS_ID/reservations"
   onclick="_gaq.push(['_link',
 'https://secure.thinkreservations.com/MY_BUSINESS_ID/reservations']); return false;">
Reservations</a>

Note: Please make sure to replace MY_BUSINESS_ID with the proper identifier to make the link functional.

Step 3: Configure Google Analytics in ThinkReservations

  1. Log into ThinkReservations.
  2. Click on "Settings" located in the black bar at the top of the screen.
  3. Choose "Business Settings" on the left hand side.
  4. Scroll to the bottom to find the "Google Analytics" configuration.
  5. Choose "Classic".
  6. Add your web property ID to the "Account ID" field
This is an example of what it should look like:

    

Contact Us

d823003ec4e62f7c319afe831ca4aee6@thinkreservations.desk-mail.com
http://assets0.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete