Conversion script

How to implement our conversion script manually

Christiaan Proper avatar
Written by Christiaan Proper
Updated over a week ago

This code should be inserted in the “Order confirmation” page, once the visitor has checked out and issued payment. Again, the variables ({{name}}, {{sku}}, etc.) mentioned below need to be dynamically filled with the data of the item.

<script>
_paq.push(['addEcommerceItem',
"{{sku}}",
"{{name}}",
"{{categoryname}}",
{{price}},
{{quantity}}
]);


// Here you can add other products in the order


_paq.push(['trackEcommerceOrder',
"{{orderid}}",
{{grandtotal}},
{{subtotal}},
{{tax}},
{{shipping}},
{{discount}}
]);
_paq.push(['trackPageView']);
</script>

Conversion script example with two products

<script>
_paq.push(['addEcommerceItem',
"9780786706211",
"Endurance: Shackleton's Incredible Voyage",
["Adventure Books", "Best sellers"],
8.8,
2
]);
_paq.push(['addEcommerceItem',
"7659837658343",
"Nike Shoe",
"Shoes",
70,
1
]);
_paq.push(['trackEcommerceOrder',
"A10000123",
92.1,
70.1,
17.5,
4.5,
false
]);
_paq.push(['trackPageView']);
</script>
Did this answer your question?