Pixel API param 'ordersCount' always shows 0

Pixel API param 'ordersCount' always shows 0

Epats
Tourist
5 0 3

Hey Community,

 

Perhaps someone has encountered that when using init.data.customer.OrdersCount parameter always returns 0?

I've tried several variations on several shops and it always returns zero, even though the account has a lot of orders.

Here's what I used for the tests:

photo_2024-07-17 09.49.55.jpeg

And the result is always 0, both on purchase and on other events:

photo_2024-07-17 09.50.00.jpeg

 

 

 

 

 

Any tips would be appreciated

 

 

 

 

 

 

 

Replies 4 (4)

EcomGraduates
Shopify Partner
794 68 113

The init.data.customer.ordersCount returning 0 might be due to timing or data availability issues. Ensure that the init object is fully loaded and the customer data is accessible before trying to retrieve the order count


 If this fixed your issue, likes and accepting as a solution are highly appreciated
|  Build an online presence with our custom-built Shopify Theme: EcomifyTheme
|  Check out our reviews: Trustpilot Reviews
|  We are Shopify Partners: EcomGraduates Shopify Partner



Epats
Tourist
5 0 3

Thanks for pointing it out for this and your reply!

 

I've checked, that's definitely not the problem, all other init data works without problems.


Perhaps there are more ideas?

 

Screenshot 2024-07-18 at 17.39.42.png

 

Screenshot 2024-07-18 at 17.40.09.png

Andrey_Acodo
Shopify Partner
2 0 0

I'm facing the same issue...

Andrey_Acodo
Shopify Partner
2 0 0

Hi @Epats,
it seems that the "ordersCount" doesn't work when the Bogus payment gateway is used.

The suggestion from the Shopify support is to use Cash on delivery payment gateway on test stores.

 

The "ordersCount" is working as expected on production stores.