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
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
<!-- 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.
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
- 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
A good Shopify developer can do this for you.
Actually, you would have to remove your script and only trigger the conversions to