Post by oclvr » Fri Apr 20, 2018 2:40 am

Hello, Google ask me to past the following product tracking code, please help me to fill up dynamic variable. We run OC Version 2.3.0.2.
<script>

ga('require', 'ecommerce');

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

ga('ecommerce:send');

</script>

New member

Posts

Joined
Mon Jul 18, 2011 5:59 am

Post by straightlight » Fri Apr 20, 2018 2:51 am

The best location to add such code would be in your own JS file where the confirm() method of your order total extension module could initiate based on the completed checkout process when the customer hits the confirm button.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 235 guests