You have no items in your shopping cart.

Thursday, May 16, 2024 10:59:51 PM

Guest user in datalayer

Posted: 1 month ago

#13638 Quote

42k

Posted: 1 month 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: 1 month ago

#13639 Quote

42k

Posted: 1 month 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: 1 month ago

#13640 Quote

Support

Posted: 1 month 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