I have written data layer on my PDP and Cart pages in the below format to use in Adobe DTM for Adobe Analytics.
<script>
var datalayer = {
transaction: {
transactionID: “<Transaction-ID>”,
zipCode: “<Zipcode>”,
paymentMethod: “<Payment Type>”,
shippingMethod: “<Ship-Method>”,
shippingCity: “<City>”,
shippingState: “<State>”,
total: {
basePrice: <base-amount>,
},
item: [{
productInfo: {
productName: " <product-name> ",
productID: "<product-id>",
productCategory: “<product-category>”,
producQuantity: <Quantity>,
basePrice: <Price>,
},
},
{
productInfo: {
productName: " <product-name> ",
productID: "<product-id>",
productCategory: “<product-category>”,
producQuantity: <Quantity>,
basePrice: <Price>,
},
]}
}
};
</script>
I want to reuse the same data layer for GA enhanced e-commerce tracking. I went to GTM help and they have defined a certain format for data layer for GTM. Could please help how to achieve enhanced e-commerce tracking using the above code.