Basus Posted October 22, 2014 Share Posted October 22, 2014 Hi, I'm trying to implement Analytics for ecommerce in Prestashop but I've got troubles to get some order details. Here is the Analytics template : ga('ecommerce:addTransaction', { 'id': '1234', // Transaction ID. Required. 'affiliation': 'Acme Clothing', // Affiliation or store name. 'revenue': '11.99', // Grand Total. 'shipping': '5', // Shipping. 'tax': '1.29' // Tax. }); ga('ecommerce:addItem', { 'id': '1234', // Transaction ID. Required. 'name': 'Fluffy Pink Bunnies', // Product name. Required. 'sku': 'DD23444', // SKU/code. 'category': 'Party Toys', // Category or variation. 'price': '11.99', // Unit price. 'quantity': '1' // Quantity. }); I have no problem to implement the first part of the code, but for the second part, I have to do a loop with each product details and I don't manage to do it... For nom, I've got this : ga('ecommerce:addTransaction', { 'id': '{$id_order_formatted}', 'revenue': '{$total_prod}', 'currency': 'EUR' }); ga('ecommerce:addItem', { 'id': '{$id_order_formatted}', 'name': '{$contenu_com}', 'quantity': '{$nb_prod}', 'currency': 'EUR' }); ga('ecommerce:send'); But this way I only get the first product. Does somebody has the answer ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now