This isn’t strictly part of the API, but it is often used in conjunction with it, so here we are.
Affiliate tracking is very simple. When your affiliates send someone to your site, simply have them append ?_aff={affiliate_name}
to the url (or &_aff={affiliate_name}
if the url already has a question mark).
So if I sent some customers to my own site, I’d use https://brentracks.sourceaudio.com.com/track/7640946?_aff=brent
or https://brentracks.sourceaudio.com/tracks?o=release_date&_aff=brent
. Any purchases they make during that session will have that affiliate code attached to them, including subscriptions (and all purchases used with credit from that subscription).
Affiliate Reports
The normal e-commerce reports include a column for both the license exports and transaction exports. In addition, you can filter the activity list, and see which affiliate sent which transaction. Screenshot below:
The exports are also filterable in the same way. NOTE: You will not see any affiliate options on the activity page until you have some affiliate data. So, do a test purchase with an affiliate code, and you’ll see everything.