The ecommerce portion of Google Analytics requires a little extra JS code on the receipt page. However, as far as I can see once a transaction has occurred there is no information returned except success/fail.

Is there away to, after a successful Tx, to pass to google analytics the results of that transaction. Basically you pass receipt information: amount & address down to the city.

I don't know if it makes a difference but in my case I'm coming back from Authorize.net.

Comments

reg’s picture

Here's the JS from google:

<script type="text/javascript">
  var pageTracker = _gat._getTracker("UA-XXXXX-1");
  pageTracker._initData();
  pageTracker._trackPageview();

  pageTracker._addTrans(
    "1234",                                     // Order ID
    "Mountain View",                            // Affiliation
    "11.99",                                    // Total
    "1.29",                                     // Tax
    "5",                                        // Shipping
    "San Jose",                                 // City
    "California",                               // State
    "USA"                                       // Country
  );

  pageTracker._addItem(
    "1234",                                     // Order ID
    "DD44",                                     // SKU
    "T-Shirt",                                  // Product Name 
    "Green Medium",                             // Category
    "11.99",                                    // Price
    "1"                                         // Quantity
  );

  pageTracker._trackTrans();
</script>
OpenChimp’s picture

I've seen some cool articles that talk about using Google Analytics to generate reports on transactions: http://www.epikone.com/blog/2008/01/13/google-analytics-e-commerce-track...

Having access to order information is also needed when setting up affiliate systems like ShareASale. In the case of ShareASale, only the ORDER-ID and ORDER-SUBTOTAL are required.

So ... how can we print these values out on the confirmation page?

Do we have access to the nid of the order, which we can use to look up specific values from the order or is there an easier way?

Thanks