Home > Paid Traffic Sources > eCommerce

Tracking shopify sales with an affiliate tracker (3)


07-10-2020 04:31 PM #1 affiliated4 (Member)
Tracking shopify sales with an affiliate tracker

Hey everyone,

I've recently decided to run my own ecom product.

I'm coming from affiliate background and would like to track my Shopify sales in Voluum

I've managed to get the conversions tracking using a code found here - so thanks for that.

The only issue is, it''s only tracking total revenue for my sales.

Is there any way of automatically sending the revenue minus the cost of the product?

This is the code i'm using to send the info from shopify to Voluum

<!-- clickid pixel: {{ landing_site_ref }} -->
{% if landing_site_ref %}
<!-- custom lander pixel: {{ landing_site_ref }} -->
<!-- clickid Code -->
<img src="https://trackingurl/conversion.gif?cid={{ landing_site_ref }}&payout={{total_price|money_without_currency}}&t xid={{ order_number }} " width="1" height="1"/>
{% endif %}

My dropshipping software is updating shopify with the cost per unit- so I just need ton know where i would find that information to send it back to voluum?

Hope that makes sense and thanks a lot for your help.


07-10-2020 10:25 PM #2 jeremie (Moderator)

Hey,

Unfortunately, you can not do that easily. The "total_price" variable you are using belongs to the "order" object which, as you can see on this page, does not include any cost
https://shopify.dev/docs/themes/liqu.../objects/order

You could do this by extracting data using Shopify GraphQL and updating Voluum, but even this is quite complicated:
- extract Order.lineItems using order_number
- for each lineItem in the Order, get lineItem.product_id and use this to access cost stored at Inventory level. A bit tricky, see below
https://community.shopify.com/c/Shop...PI/td-p/458857
- once you have the cost for each product, multiply by lineItem.quantity and you get the total cost by Order.lineItem
- make the sum
- update Voluum

A good Shopify developer can do this for you.


07-10-2020 10:32 PM #3 jeremie (Moderator)

Actually, you would have to remove your script and only trigger the conversions to Voluum once you have made the calculation, because the Voluum API does not seem to have a way to update the cost of a particular conversion.


Home > Paid Traffic Sources > eCommerce