Skip to content

Attribute affiliate referrals

Affiliate links carry an mref code. The App Store strips query parameters, so the code cannot survive the listing hop on its own; something has to carry it to the install. There are three carriers, use any or all:

Section titled “1. The tracking script plus your app (recommended)”

Your marketing site includes the tracking script, which stores the code for 30 days:

<script src="https://partnerconsole.co/affiliate-track.js"></script>

When the merchant installs and lands in your app, your backend forwards whatever code the browser still holds (readable at window.affiliateTrack.referralCode on your site, passed through your install flow):

Terminal window
curl -X POST https://partnerconsole.co/api/v1/attribution \
-H "X-Api-Key: $API_KEY" -H "Content-Type: application/json" \
-d '{"app": "your-app-slug", "myshopifyDomain": "example.myshopify.com", "mref": "jess-agency"}'

The response tells you whether the code won: attribution is first-touch, so a shop already credited to another affiliate returns {"attributed": false, "reason": "already attributed"}. Every code seen is logged either way, so disputes are answerable.

If the workspace has the BigQuery integration connected, install events from the App Store listing that carry a referral code in their URL attribute automatically. Nothing to build; it just narrows coverage to installs Google observed.

Let merchants type a partner code during onboarding and submit it through the same attribution endpoint. This survives cleared cookies, cross-device installs, and verbal referrals from agencies.