Mobile app version of vmapp.org
Login or Join
Michele947

: Tracking an e-commerce conversion with Google Analytics - Analytics.js I'm running a Rails (Ruby on Rails) app and want to start collecting e-commerce conversion data. I have Google Analytics installed

@Michele947

Posted in: #Ecommerce #EventTracking #GoogleAnalytics #RubyOnRails

I'm running a Rails (Ruby on Rails) app and want to start collecting e-commerce conversion data. I have Google Analytics installed on a local server (development environment), and I am able to see the data from local visits (aliased / tunneled localhost:3000), and track real-time Goal Conversions just fine. However, I am not able to see any e-comm conversions. Here is what the rendered JS snippet looks like:

<script>
...
// tacking code
// ga(create)
...

ga('send', 'pageview');

ga('require', 'ecommerce');
ga('ecommerce:addTransaction', {
'id' : '298',
'affiliation' : 'Tax',
'revenue' : '0.0',
'shipping' : '0.0',
'tax' : '0.0'
});
ga('ecommerce:addItem', {
'id' : '227',
'sku' : '227',
'name' : 'Alpha 0 featured listing',
'category': 'Appliances',
'price' : '23.34',
'quantity': '1'
});
ga('ecommerce:send');
</script>


The ecommerce object calls are added on the thank-you page. Otherwise, only the pageView event gets sent. Am I doing it wrong by combining addItem and addTransaction?

EDIT:

I am able to see both hitType vars being sent up via google_analytics_debug.js

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Michele947

1 Comments

Sorted by latest first Latest Oldest Best

 

@Bryan171

Go to your Google analytics Admin page and check if your VIEW(s) has ecommerce enabled (Set to ON). Also make sure you have created a Goal to track conversion to that "thank you" Page.

If you use a destination goal to the "thank you" page remember to leave the goal Value field blank.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme