Page MenuHomePhabricator

Create MobileAppRedirect special page to redirect users to the correct app store to download the Wikipedia App
Open, Needs TriagePublic

Description

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.

NOTE: This is intended to be a light weight solution that will not include all desired logic or nuance. It will, however, fix our immediate need and provide a foundation that the mobile apps team can then refine and expand as needed. This is an intentional copy/slightly different take on what is outlined in T419775: Add Special:MobileAppRedirect to MobileApp extension for app store redirection

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:
  • 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:

  1. How should we combine internal campaign information with external referrer information? You can only have one utm source.
  2. 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?
  1. Implementation details
  2. 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
  3. 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.
  4. 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

Event Timeline

@HCoplin-WMF, what should we do on projects other than Wikipedia? Like Wikidata or Commons? Those projects do not have an app; therefore, probably we shouldn't redirect to the store? Do we return 404 not found, or just redirect to the correct portal?

Preference would be to redirect to the correct portal page where possible. It also raises the question of if we should include these CTAs on those projects in general though (and the answer is probably no)

@MGoncalves-WMF can we rename the Special page to be MobileAppRedirect ? In case a different project gets an app, we don't want to create a new page, instead. I think that using MobileAppRedirect should be sufficient.

Also, in this ticket, lets handle only basic redirection ( from Wiki to the App store). Things like campaign parameter handling or Mobile App support are submitted as separate tickets ( see T437085 and T437084 )

MGoncalves-WMF renamed this task from Create a basic special page that redirects users to the correct app store to download the Wikipedia App to MobileAppRedirect to download the Wikipedia App.Sat, Sep 5, 12:44 AM
MGoncalves-WMF renamed this task from MobileAppRedirect to download the Wikipedia App to Create MobileAppRedirect special page to redirect users to the correct app store to download the Wikipedia App.Sat, Sep 5, 12:53 AM