Browse chapters
Referral Links
Practical guidance on referral links for Shopify app founders.
Tracking and Attribution · ~5 min read
On this page
A referral link is the simplest way to credit a partner, and for a Shopify app it is also the easiest thing to get wrong. The link a partner shares and the way your app records the install have to line up, or the credit disappears.
What a referral link actually carries
A referral link carries a partner's code from the moment a merchant clicks to the moment they install. The code is the whole point: it tells you which partner to credit. The real question is how that code survives the trip through the Shopify App Store and your app's install flow, because Shopify does not make that easy.
Why a plain App Store link fails
The obvious approach, handing a partner apps.shopify.com/your-app and tacking a code onto the URL, does not work. Shopify strips query parameters before your app's OAuth callback, so by the time the merchant installs, the code is gone. A raw App Store link with a code in it looks like it should work and quietly does not. This trips up almost every founder at least once.
The two links that do work
- •A tracked redirect link (for example getpartnerdock.com/r/CODE) that routes the merchant through a page you control. It drops a cookie and can send the merchant through your install URL carrying the code, so the code survives into your install flow.
- •A direct App Store link with an mref code (apps.shopify.com/your-app?mref=CODE), the Mantle-style format. The code is still stripped at install, but wrapping it in a redirect you control gives you the cookie, and analytics can sometimes recover the rest.
In both cases the reliable part is the hop through a page you own, not the App Store URL itself.
The signal that actually holds
The most reliable signal is a code your app forwards at install time. When a merchant clicks a tracked link, the partner code rides along to your install flow, your app reads it, and forwards it to your attribution system. That forwarded code is an exact match: you know precisely which partner drove the install, with no guessing and no window.
One code per partner, across every app
A partner who promotes more than one of your apps should keep one code across all of them, not a different code per app. Otherwise a link they already shared can break when it collides with another app's code. Let the link carry which app it is for, and keep the code the partner's own.
Practical checklist
- ✓Partners share a link that hops through a page you control, not a raw App Store URL
- ✓Your app forwards the partner code at install so the match is exact
- ✓You have a cookie fallback for merchants whose code does not survive
- ✓Multi-app partners keep one code across every app they promote
Common mistakes
- ✕Handing partners a raw App Store link with a code in the query string
- ✕Assuming Shopify preserves your parameter through the OAuth callback
- ✕Giving the same partner a different code for each of your apps
How this works in PartnerDock
In PartnerDock, every partner gets a tracked /r/CODE link that sets a cookie and routes the merchant through your install URL carrying the code, plus an optional direct ?mref= App Store link. Your app forwards ref, mref, or utm_source at install for an exact, auto-approved match. Partners who promote several of your apps keep one code, with app-specific /r/your-app/CODE links so the merchant always lands on the right listing.
Try PartnerDock FreeFAQ
Can I just put the partner's name in the App Store URL?+
No. Shopify strips query parameters before your app's install callback, so the name never reaches your app. You need a redirect you control or an analytics-based recovery.
Do partners have to change their links if they promote a new app of mine?+
No. They keep one code, and the app-specific link carries which app it is for, so their existing links keep working.
Start your partner program with PartnerDock
Manage partners, attribution, commissions, and payouts in one place — free to start.
Start FreeRelated chapters
Click Tracking
Practical guidance on click tracking for Shopify app founders.
Shopify Partner API Attribution
Practical guidance on shopify partner api attribution for Shopify app founders.
Manual Merchant Attribution
When links aren't enough: how to credit a partner for a store they genuinely referred, and keep it honest.
