Add Customer Information to Checkout Completed Custom Pixels Event

Add Customer Information to Checkout Completed Custom Pixels Event

Jordan-
Visitor
3 0 11

Pixles for Google and Meta can better acquire new customers if we are able to provide them with conversion information on the LTV of who we are acquiring. In the checkout.liquid that was possible via the customer object, but that is missing / not accessible here:

https://shopify.dev/docs/api/web-pixels-api/standard-events/checkout_completed

 

The ask, is to get customer information on order count (inclusive of the current order) and if possible their customerLifetimeValue (ideally subtotal based, excluding shipping/taxes) accessible in the web-pixels-api for checkout_completed.

 

A more sophisticated implementation would be to have the actual customer.orders array, so we can do advanced "new customer" tagging (for example, Google treats a new customer as someone who hasn't purchased in the last 540 days).

Replies 8 (8)

Liam
Community Manager
3108 340 872

Hi Jordan,

 

Would you need access to this property/ data in order to display custom content on post-purchase pages for specific customers, or is this more for analysis after sales are made?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Jordan-
Visitor
3 0 11

Hi Liam, this is not for custom UI, but purely to send the data via the Settings>Customer Events>Custom Pixel to 3rd party pixels so they can better target/acquire new customers.

Hez_
Shopify Partner
1 0 2

Is there any way access customer data in a custom pixel? I have a similar use case. I have a checkout_completed event where a 3rd party requires the customers order size to determine if they're a new or existing customer. Is this possible?

lynth
Shopify Partner
103 5 14

are you able to send at least any data to the GTM with the checkout_completed event?

If my tips are useful, just mark it as the solution. Cheers!
Feeling grateful? Buy me a coffee!

trexodore
Shopify Partner
4 0 0

I also need to access customer information on basic events like "product_viewed". It was accessible in liquid and makes for better tracking to 3rd party pixels yet it's not available on the event data in custom pixels.

lynth
Shopify Partner
103 5 14

Same problem here.

If my tips are useful, just mark it as the solution. Cheers!
Feeling grateful? Buy me a coffee!

benbenben1
Shopify Partner
5 0 0

+1 on this. Some analytics pixels need a unique user identifier and historically that has been the Shopify customer ID.

Not having access to this is already pushing more people to using the email address for the unique identifier in analytics calls which is not always ideal since an email is commonly considered personally identifiable information and a customer ID is not.

cube3
Shopify Partner
1 0 1

At least you can access customer order total. it is not obvious but try to console.log(init) inside your subscription to event. "init" object contains customer data also. 

https://shopify.dev/docs/api/web-pixels-api/standard-api/init