Description
One of the key calls to action that is surfaced by the Attribution API is downloading the app. However, there is no simple, canonical URL on the wiki that directs mobile users to the correct app store.
Because end users are not always the ones calling the API directly (eg: Discord generically pulling attribution information once, then resurfacing to all users through their own app), we do not alawys have direct access to the device information from the API itself. Because of this, we need to have a way of generating the correct link on the fly, after the user clicks the CTA link, then redirecting them to the appropriate store at that point. A Special Page that exclusively redirects to other pages is the most appropriate solution.
Conditions of acceptance
- Create a special page within Wikimedia Customizations; proposed name: Special:WikipediaMobileAppRedirect
- The page's purpose is to redirect users to the appropriate locations:
- If the user accessing the page has an iOS device, bring them to the Wikipedia app on the Apple App store: https://apps.apple.com/app/wikipedia/id324715238
- If the user accessing the page has an Android device, bring them to Wikipedia app the Google Play store: https://play.google.com/store/apps/details?id=org.wikipedia
- If the user is on an traditional web browser or unknown device, redirect to the Wikipedia.org portal page
- If the user already has the app installed redirect to the main page
- A generic link to this page is returned through the "Download the app" CTA within the Attribution API. Attribution API users may provide this value blindly, then users who click on the link are redirected appropriately by the page itself.
OUT OF SCOPE
- We will not handle special logic at this time, such as preventing a redirect if the user is in a country where the app is not available.
- We may not have complete coverage for nuances around certain devices, like iPads or other tablets showing as standard browsers.
- For URL campaign , see tasks T437085 and T437084 *The page accepts and re-appends utm information if they are provided. For example, if a user clicks from Discord and the Discord utm_source is provided on the URL, that source persists on the page and through the redirects. Similarly, if there is Wikimedia campaign specific information, it is appropriately handled and reattached. (SEE OPEN QUESITON)
OPEN QUESTIONS:
- How should we combine internal campaign information with external referrer information? You can only have one utm source.
- Should we also append an "attribution" utm value and/or other piece of metadata to know that the link was used through the Attribution API?
- Implementation details
- Server-side detection is handled via the User-Agent header
- Basic iOS detection: iPhone, iPad, iPod in UA string
- Basic Android detection: Android in UA string
- No additional logic is needed for per-country store pages; both the Play and Apple stores do their own redirects to the correct region when the generic app route is used.
- URLs configurable via wiki config variables rather than hardcoded, so that additional campaign data can be added if desired.
IF NEEDED:
- A campaign URL parameter should be accepted and passed through to the store URLs
- Example: Special:MobileAppRedirect?campaign=footer_banner_2026
- For Google Play, appended as &referrer=utm_campaign%3D{campaign}
- For App Store, appended as &ct={campaign}
- If no campaign parameter is provided, redirect without campaign tracking