Thank you page new/existing customer object

13 0 4

Hi, I received instructions to install tracking pixels on a thank you page. It sounds simple, but there are 2 different pixels - one should fire only when the customer is new and the other when the customer is returning.


Can we get the status of the customer on thank you page and fire pixel based on new/returning?

Reply 1 (1)

29 1 21

Try this one 

{% if checkout.customer.orders_count <= 1 %}
// fire smth for new customer
{% else %}
// fire smth for returning customer
{% endif %}