Custom User Agent

Median automatically appends a string to the device user agent so you can easily identify traffic originating from your mobile app versus a standard mobile or desktop browser. You can customize this string or fully override the user agent to suit your needs.

Default User Agent Strings in Median

By default, Median appends a platform-specific identifier to the end of the native device user agent:

  • iOS: MedianIOS/1.0 median
  • Android: MedianAndroid/1.0 median

This modification enables your server to detect and respond differently to requests coming from your Median-powered app.

By default, the following strings are appended to the end of the device user agent:

In the iOS app, the device default user agent is appended with MedianIOS/1.0 median
In the Android app, the default device user agent is appended with MedianAndroid/1.0 median

📘

GoNative → Median Transition

If your app was originally built with GoNative.io (before the Median rebrand), the default user agent strings differ:

iOS app: GoNativeIOS/1.0 gonative
Android app: GoNativeAndroid/1.0 gonative

To confirm the exact user agent being used in your app, open the Web Overrides tab in your Median dashboard or visit https://median.dev/device-info/ from within your app.

Using a Custom User Agent

You can fully customize the user agent by selecting the Custom option in your app configuration and entering your preferred string. This gives you complete control over how your app identifies itself to your backend.

Detecting Median in JavaScript

You can also detect whether a request originates from your app directly in your website’s JavaScript using navigator.userAgent. For example:

if (navigator.userAgent.indexOf('median') > -1) {
  // App-specific logic here
}

Next Steps