Send order data to a Platform connected with a Shopify store

Solved
Highlighted

Hey guys, I’m trying to send order data to a shopping comparison platform linked with a Shopify store. I know that I have to add an additional script on the checkout page, this is provided by the platform documentation:

<script>
skroutz_analytics('ecommerce', 'addItem', {
order_id: '123456', // Order ID. Required.
product_id: '111222', // Product ID. Required.
name: 'Apple IPhone 6 Plus (16GB) Space Gray EU', // Product Name. Required.
price: '654.90', // Price per Unit. Required.
quantity: '2' // Quantity of Items. Required.
});
</script>


but I don’t know how to make it generic, to track all orders. Any help would be appreciated. Thanks :)

0 Likes
Highlighted
Pathfinder
102 20 30

This is an accepted solution.

Hi @Panos_Tzitzinos, Please check the following document for the order object details. 
https://shopify.dev/docs/liquid/reference/objects/order

Following is an example to use it.

<script>
skroutz_analytics('ecommerce', 'addItem', {
order_id: "{{ order.id }}",
name: "{{ order.name }}",
...
}); </script>





- Feel free to contact me at waqas4346@gmail.com
- Was my reply helpful? Click Like and Accept as Solution
0 Likes
Highlighted

Thank you @m_waqas , this helps a lot. 

0 Likes