42k wrote:
Cleaning up my Post:
In my thankyou page i try to overwrite TrackingCodeManagers datalayer. Almost all my customers is Guest, hence "guest" is added as emailadress to the datalayer. This wont work for me, i need a customers Emailaddress in Enhanced Ecommerce.
So i tried and override the datalayer, this works for most events, but NOT for the purchase event (All other events gets the emailaddress from Billingaddress). Does it have something with executionorder of the scripts? Is it possible for me to try and do this?
window.dataLayer = window.dataLayer || [];
window.dataLayer.push(
{
'PageType': 'ThankYou',
'PageUrl': 'https:xxx/Plugins/PaymentsKlarnaCheckout/ThankYou',
'email': "@order.BillingAddress.Email"
}
);