FAQ Q201: How can I track my reservations in Google Analytics?

First of all, tracking Planyo reservations in Google Analytics works only in the advanced integration mode. You can read more about integrating Planyo with your existing web site here

Reservations can be tracked in Google Analytics in two ways, as goals and Ecommerce transactions. Before you start tracking reservations you need to do two things:
1. Add Google Analytics tracking code to your pages.
First of all, you need to add tracking code to your web site pages. The tracking code is profile-specific, so you can only access it from the Profile Settings page for that profile on your Google Analytics account. The code will more less look like this:

 type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _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);
  })();


Once the Google Analytics code appears on your reservation page, Planyo will automatically find it when a reservation is made and use it to add the tracking event. The Google Analytics tracking code comes in two versions: asynchronous and traditional. Planyo can recognize both of them. For the asynchronous version, Planyo looks for the _gaq object and for the traditional version, the pageTracker object.
2. Set up your Google Analytics account to track goals and/or Ecommerce transactions.
Setting up goals
In order to track reservation goals, you need to create a goal in the profile of the web site hosting the planyo system. In the Website Profiles main view of Google Analytics, find the web site profile and click Edit.
On the Profile Settings page, find the Goals section, choose the set where you want to add reservations tracking and click the Add goal link on the right.

On the Goal Settings page, go to the Goal Name field and type a name of your choice, for example reservations. As the Goal type choose URL Destination. This will show the Goal Details section where you can choose how goals will be counted. In the Match Type drop-down list choose Head Match and in the Goal URL type /planyo-reservation.html (if you want to track reservations made, regardless of their status) or /planyo-confirmed-reservation.html (if you want to track only confirmed reservations, specifically in case of confirmations triggered by the customer: automatic or by obligatory payment). Additionally, you can also define the goal value. One you are done, click Save Goal button.

And how it works? Each time a reservation is successfully finished, planyo will track the virtual planyo-reservation.html page through your Google Analytics code. Since you have just set up the goal to use this page as a match, it will be counted by Google Analytics as a goal conversion and will appear in the report.
Note that it usually takes about one day after creating a goal before the tracking actually starts.
In order to see the goals report, go to the View Report page of the profile and click Goals in the panel on the left. This allows you to view Goals Overview, Total Conversions and other useful statistics.
Setting up Ecommerce transactions
For Ecommerce transaction tracking, you need to turn on the E-Commerce Site option in the profile of the web site hosting the planyo system. In the Website Profiles main view of Google Analytics, find the web site profile and click Edit.
On the Profile Settings page, go to the Main Website Profile Information section and click Edit on the right.
On the Edit Profile Information page that opens, go to the E-commerce Website section and select the option Yes, an E-Commerce Site. When you are done, click the Save Changes button.
Note that it usually takes about one day before Ecommerce transactions tracking actually starts.
In order to see the Ecommerce report, go to the View Report page of the profile and click Ecommerce in the panel on the left. This allows you to view Ecommerce Overview, Total Revenue and other useful statistics.

Please see Q267 if you'd like to use a different analytics/tracking system.
Back to Frequently Asked Questions