Global JS variable on Woocommerce order confirmation page with order and user data

Viewed 22

I work at a good-sized agency with hundreds of clients using WooCommerce, as well as the other major ecommerce platforms out there (Shopify, BigCommerce, Magento etc).

We are looking to start moving our clients to Google Ads enhanced conversions. For our Shopify clients, we have access to a global 'Shopify' object you can inspect in the DevTools JavaScript console that allows us to pass the first-party user details directly to Google Ads without making any code changes to each and every client's site (ie Shopify.checkout.email).

I am looking to see if there is anything similar with WooCommerce. I have done some test purchases on a localhost test site myself, but I don't see anything comparable. Before I report back to my department that we will not be able to do this as simply on WooCommerce, I thought I would put the question on StackOverflow to see if anyone has any good information that could help here.

Thank you!

0 Answers
Related