: 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
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
More posts by @Michele947
1 Comments
Sorted by latest first Latest Oldest Best
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.