Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Thank you page new/existing customer object

Thank you page new/existing customer object

vlinas
Tourist
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)

Mitrodol
Excursionist
31 1 22

Try this one 

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