I am having issues with Google Analytics eCommerce tracking. On certain days it the eCommerce tracking is returning a value of $1.00 of revenue which is impossible because it is a hotel booking website. I'm am so puzzled and not knowing where to go next with this.

Here is some code that might help, I received this from our contact who develops the booking engine.

This is included on every page except the reservation confirmation page:

<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-26956700-1']);
  _gaq.push(["_setDomainName", "none"]);
  _gaq.push(["_setAllowLinker", true]);

  (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);

This is included only on the reservation confirmation page: (The "${res.xxx}" elements are replaced on the server side with reservation details.)

  <script type="text/javascript">

  var _gaq = _gaq || [];

  _gaq.push(["_setAccount", "UA-26956700-1"]);

  _gaq.push(["_setDomainName", "none"]);

  _gaq.push(["_setAllowLinker", true]);


  _gaq.push(["_addTrans", "${res.confirmationNumber}", "Sunshine", "${res.grandTotal}", "${res.totalPriceTax}", "", "", "", ""]);

  _gaq.push(["_addItem", "${res.confirmationNumber}", "${res.roomType}", "", "", "${res.totalPrice}", "1"]);

  _gaq.push(["_addItem", "${res.confirmationNumber}", "Options", "", "","${res.otherChargeChoices.totalCostExclTax}", "1"]);



   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); })();

1 Answer 1


Does anybody else have access to the code? Like a developer testing the website? For example, in a staging environment, sometimes I'll have a client create a item that costs 1.00 to test ecommerce tracking. If that's the case, just create a filter excluding your developers IP address.

Also, where "${res.grandTotal}" is getting populate server-side, can you look to see if there are any $1.00 purchases?

  • There would not be any $1 purchases because nothing is on sale for $1.00 on our hotel's website. I will be in touch with the developer about a possible staging environment but this issue is still not solved =(.
    – crayden
    Sep 19, 2013 at 22:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.