You have no items in your shopping cart.

Monday, April 29, 2024 11:22:12 PM

Guest user in datalayer

Posted: 3 weeks ago

#13638 Quote

42k

Posted: 3 weeks ago

#13638 Quote
            window.dataLayer = window.dataLayer || [];
            window.dataLayer.push(
In my thankyou page i tried to overwrite TrackingCodeManagers datalayer. As almost all my customers is Guest. "guest" is added as emailadress to the datalayer.

But this wont work for my purchase event (All other events gets the emailaddress from Billingaddress). Does it have something with executionorder? Is it possible for me to try and do this?

                
{
                    'PageType': 'ThankYou',
                    'PageUrl': 'https:xxx/Plugins/PaymentsKlarnaCheckout/ThankYou',
                    'email': "@order.BillingAddress.Email"
                }

            );

Posted: 3 weeks ago

#13639 Quote

42k

Posted: 3 weeks ago

#13639 Quote
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"
                }

            );

Posted: 3 weeks ago

#13640 Quote

Support

Posted: 3 weeks ago

#13640 Quote
You should open the file Checkout/Completed.cshtml.
This file has a model OrderModel.
Use this file.

Powered by nopCommerce

Copyright © 2023 FoxNetSoft. All rights reserved