cancel
Showing results for 
Search instead for 
Did you mean: 

Question about conversion tracking

sverberght
Just visiting

@PinterestGabby I've made this very beautiful code, to track conversions.


<script>!function(e){if(!window.pintrk){window.pintrk = function () { window.pintrk.queue.push(Array.prototype.slice.call(arguments))};var n=window.pintrk;n.queue=[],n.version="3.0";var t=document.createElement("script");t.async=!0,t.src=e;var r=document.getElementsByTagName("script")[0]; r.parentNode.insertBefore(t,r)}}("https://s.pinimg.com/ct/core.js"); pintrk('load', '2613792756679', {em: '{{ customer.email }}'}); pintrk('page');</script>

{% if first_time_accessed %}
<script>
pintrk('track', 'checkout', {
value: {{ total_price | times: 0.01 }},
currency: '{{ currency }}',
order_id: '#{{ order_number }}',
order_quantity: {{ item_count }},
line_items: [ {% for line_item in order.line_items %}
{
product_category: 'not specified',
product_id: '{{ line_item.product_id }}',
product_name: "{{ line_item.title }}",
product_price: {{ line_item.line_price | times: 0.01 }},
product_quantity: {{ line_item.quantity }}
},
{% endfor %} ]
});
</script>


My question: Someone orders in total 5 products for example so 'order_quantity: 5'. Shouldn't there be five checkouts trackt in Pinterest? Or is it just one?

 

Kind regards,
Sarah

Reply
0 Kudos
1 Reply
PinterestRenato
Moderator
Moderator

@sverberght Hi, Sarah, 

 

I believe this is a beautiful code, it makes me wish my tech skills were not as limited as they are! Regarding your question, according to the example you provided, 5 products on a single purchase, the tracking will return only 1 Checkout event fired, but the number of products won't be ignored so the Checkout quantity will be 5. I hope it clarifies! Let me know if I can help you with anything else, please. 

**If my reply helped you please mark it as the "Accepted Solution". Need help with an account-specific question? PM me!
Reply
0 Kudos
Reply
Loading...