You have no items in your shopping cart.

Wednesday, April 24, 2024 7:36:01 PM

Order Comleted Data Layer

Posted: 3 years ago

#11168 Quote

idokar

Posted: 3 years ago

#11168 Quote
Hello,
Can you send a datalayer sample for a basket with more than one product for the order completed page ?

<script>
window.dataLayer = window.dataLayer || [];
dataLayer.push({
   'transactionId': %UniqueUserId%,
   'transactionAffiliation':%CustomerEmail%,
   'transactionTotal': %OrderTotal%,
   'transactionTax': %OrderTaxTotal%,
   'transactionShipping': %OrderShippingTotalInclTax%,
   'transactionProducts': [{
       'sku': '%ProductIds%',
       'name': '',
       'category': %PageType%,
       'price': %ProductPrice%,
       'quantity': %Quantity%
   }]
});
</script>

Posted: 3 years ago

#11169 Quote

Support

Posted: 3 years ago

#11169 Quote
Can you try trial version and check the datalayer?

Posted: 3 years ago

#11170 Quote

idokar

Posted: 3 years ago

#11170 Quote
I bought the full version. I want help with the use I want an example.Does not exist in your sample documents with data layer

Posted: 3 years ago

#11171 Quote

Support

Posted: 3 years ago

#11171 Quote
I can't understand you. Plugin adds all products (not one!) from the order in this DataLayer object. See example.

<script>
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
   }]
});
</script>

Posted: 3 years ago

#11172 Quote

idokar

Posted: 3 years ago

#11172 Quote
This example is the example of google i want the example created with plugin above like my example. Can you help

Posted: 3 years ago

#11173 Quote

Support

Posted: 3 years ago

#11173 Quote
An you want to create array for product order items.
Am I right?

'transactionProducts': [{
       'sku': '%ProductIds%',
       'name': '',
       'category': %PageType%,
       'price': %ProductPrice%,
       'quantity': %Quantity%
   }]

Powered by nopCommerce

Copyright © 2023 FoxNetSoft. All rights reserved