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

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.



New member


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.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Legendary Member


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

Users browsing this forum: No registered users and 49 guests