Measuring campaigns on phones that cannot install apps.

When a campaign link is opened on a phone that cannot install your Android app, Measura logs the click and hands the visitor the USSD code you configured, so they still reach your service over the mobile network, without the app and without data.

From a tapped link to a dialled code.

Four parties, seven steps. The click is logged before the visitor ever sees the code, and the last step is always theirs. *123# stands in for your own code.

  1. Phone → Link resolver: The visitor taps the campaign link.GET /{slug}
  2. Link resolver: Classifies the device from its user agent.feature_phone · ios · other
  3. Link resolver: Logs the click before redirecting.raw_payload.ussd_shown = true
  4. Link resolver → USSD page: Sends the code and the slug, nothing else.302 /ussd?c=*123%23&s={slug}
  5. USSD page: Re-validates the code it was handed.^[*#][0-9*#]{1,30}#$
  6. USSD page → Phone: Shows the code. Open dialler pre-fills it.tel:*123%23
  7. Phone → Mobile network: The person presses call.*123#
  8. Phone → Link resolver: Or: Continue to the website instead.GET /{slug}?web=1
  9. Link resolver → Phone: Skips the USSD page this time.302 fallback_url

Who is shown the code.

The resolver reads the device class from the user agent and usableUssd() · backend/lib/link-resolution.tsReturns the code only for devices that cannot install the app but can dial. Everyone else resolves normally..

  1. android

    The app destination, or the fallback URL when the Link has none. It can install the app, which is the better destination.

  2. desktop

    The fallback URL. It cannot dial anything.

  3. feature_phone · ios · other

    This page, when the Link has a USSD code configured. None of them can install an Android app, so the code is the only remaining route to your service.

What the page will not do.

A public page that shows a code under Measura’s name has to be hard to misuse. These are the lines it holds.

Short links in the API reference

Dialling
A browser cannot run a USSD session. The page opens the dialler with the code filled in, and the person presses call. Nothing dials on their behalf.
Destination
The page accepts the code and the slug and nothing else. The link back to the website is rebuilt from its own configured link base, so it cannot be used as an open redirect.
Encoding
The # in a code is percent-encoded in the tel: link, or diallers cut the code off at the first hash and dial something you never configured.
Format
A code is checked against the same GSM MMI pattern when it is saved, when the link resolves, and again when this page renders it. A value that fails is treated as absent.
USSD | Measura