Any way to track sales by a specifc "landing_site_ref"/ref code?

nshockwa
Visitor
2 0 0

I set up an affiliate's store to point checkout links to my store with every url containing a ref code to indicate that it came from them. I utilized permalinks for every product with the following structure: http://{my-store.myshopify.com}/cart/{variant_id}:{quantity}?ref=came-from-{affiliate-store-identifier}.
I thought that these ref codes would be a filterable type of sales funnel (was hoping sales by referrer could drill down this deep), but I can't seem to find the ref code anywhere other than in the full session details window on a specific order or in the api. What would be the best/simplest way to filter sales containing this ref code so I can adequately compensate the referrer?

Reply 1 (1)
nshockwa
Visitor
2 0 0
Follow-up Q: I suppose I could manually query the api and check every 60 days at the latest which orders had that ref code, but I’d like to automate it somewhat. The pagination and amount of orders we get would make it take quite a while to check manually. Let me know if y’all have any tips!