Take a look at how Ebates does this. They link to the iTunes store through Apple's program in the LinkShare network (so you'll need to find analogous instructions for whichever network you use with iTunes: PHG, TradeDoubler, LinkShare, etc).
Notice that your outbound click to the iTunes store from Ebates contains a URL parameter u1
with a unique ID that looks like ebs1234567890sbe
. That's what's called a "Signature" or "ShopperID" or "SID value". That ID gets attached to the user so that when they complete a purchase and you get your commission, your reporting will have this ID attached to the transaction. That's how cashback affiliates know to give the right cashback to the right user and you can use that same feature for your needs.
So, some steps for you:
- Find the documentation for sending SID values for the affiiliate network you're using to send traffic to iTunes. Here's the documentation for LinkShare (pdf).
- Pass a user id with clicks to iTunes
- Integrate with your affiliate network's commissions API so that your servers know when a sale has been completed and which user id completed the sale
EDIT: iTunes affiliates working through the PHG network will find these resources useful:
- This PDF is PHG's quick start guide. Follow the instructions for "Sub-ID tracking parameters."
- PHG's API Docs discuss reporting methods.
- Thanks to @Deepukjayan, here is the precise API query syntax for getting your
pubref
value back from PHG's iTunes API: https://login:pass@itunes-api.performancehorizon.com/reporting/report_publisher/publisher/YOUR_ID/conversion.json?publisher_reference=YOUR_PUBREF_STRING