You have no items in your shopping cart.

Sunday, November 24, 2024 9:47:37 PM

Wrong tracking code for Google tag Manager

Posted: 6 years ago

#8486 Quote

danie.roux78

Posted: 6 years ago

#8486 Quote
We are using your tracking code manager in our nopCommerce installations. It’s been brought to our attention that the GTM data layer for the Order Complete page does not implement the standard eCommerce data layer. This is the code generated by the plugin:

window.dataLayer = window.dataLayer || [];
var order_product_list = [];
order_product_list.push(
     { id: '19', price: 100.00, quantity: 4 }
);
dataLayer.push({
    'PageType':'OrderCompletedPage',
    'PageUrl':'http://demo410.ars-test.ua/en/checkout/completed/132',
    'email': 'admin@yourStore.com',
    'value': '503.71',
    'currency': 'USD',
    'orderid': 132,
    'ProductIDList': order_product_list
});


Vs the standard data layer as per Google’s recommendation:


window.dataLayer = window.dataLayer || [];
dataLayer.push({
   'transactionId': '1234',
   'transactionAffiliation': 'Acme Clothing',
   'transactionTotal': 38.26,
   'transactionTax': 1.29,
   'transactionShipping': 5,
   'transactionProducts': [{
       'sku': 'DD44',
       'name': 'T-Shirt',
       'category': 'Apparel',
       'price': 11.99,
       'quantity': 1
   },{
       'sku': 'AA1243544',
       'name': 'Hat',
       'category': 'Apparel',
       'price': 9.99,
       'quantity': 2
   }]
});

Posted: 6 years ago

#8487 Quote

Support

Posted: 6 years ago

#8487 Quote
I added it in release 1.30
Thank you

Powered by nopCommerce

Copyright © 2023 FoxNetSoft. All rights reserved