r/iOSProgramming • • 7d ago

Question Tracking installs source?

Hi, everyone! I am running my IOS application and I am thinking to by some ads, but I want to be able to track how much customers will it bring to me.

Apart from discount code can I do it in any other manner or discount code is the only thing I can use to be sure people are comming from some source?

I was expecting what I can add something to appstore url and it will be passed in my app so I will be able to collect it, but it looks like I will not be able to do so, right?

The goal here is to be able to see where each user came from

4 Upvotes

8 comments sorted by

View all comments

2

u/DimensionMindless336 7d ago

You're right that nothing you tack onto the App Store URL survives into the app — Apple strips all query params, so there's no ?ref=foo you can read at first launch. The existing answers cover the Apple-side options well (pt/ct campaign links in App Analytics, AdServices for ASA, SKAdNetwork/AdAttributionKit for Meta/TikTok), but those are either aggregated or platform-specific. If your actual goal is "know where each user came from," the practical missing piece is a first-party approach:

The reliable way is to run the attribution through a landing page you control before the App Store hop. Put a token in your own short link (yourdomain.com/x/reddit), store it in a first-party cookie (plus a fallback), and do one of two things at install:

  • Promo/discount codes — the thing you already mentioned is genuinely the most robust signal you have, because the user types it in-app and you own the whole path. Give each channel its own code (REDDIT, TIKTOK) and you get clean per-source numbers without any SDK. The trick is to make redemption effortless: auto-fill it from the cookie on first launch so the user doesn't have to remember it, and still let them type it manually.
  • Deferred deep linking — if you want the source silently, a provider like Branch/AppsFlyer/Adjust (or a self-hosted equivalent) matches the install back to the click using fingerprint/probabilistic matching. This works after the App Store round-trip precisely because it doesn't rely on params surviving it. Self-hosting is more work but avoids per-install fees at low volume.

Two things that bit me when I set this up: first, App Store Connect campaign links (pt/ct) only report downloads and proceeds per campaign, and they exclude users who turn off share-with-developers — fine for ROI at the channel level, useless for per-user. Second, if you go the MMP route, the SDK init must happen at the very first launch before any gating, or you lose the attribution window. And the ATT prompt affects cross-app tracking, but the click-to-install match from an MMP or an AdServices token doesn't need ATT consent, so don't conflate the two.

For a small budget starting out, honestly: distinct discount codes per channel + distinct pt/ct campaign links will tell you 90% of what you need without spending a cent on infrastructure. Add a deferred deep-link provider only when the per-user granularity is worth paying for.