Custom User Agent


By default a string is appended to the end of the device user agent so that you can identify requests originating from your app versus a standard mobile browser. You may choose to customize the string that is appended or provide a complete custom user agent to be used as a replacement instead of the device default user agent.

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 GoNativeIOS/1.0 gonative
In the Android app the default device user agent is appended with GoNativeAndroid/1.0 gonative

You may specify your own custom user agent by selecting the Custom option and then providing your custom user agent.

The user agent is sent in the headers of each HTTP request coming from the app. You can then recognize the request is coming from the app by checking if it contains gonative. This is useful if you want to serve different CSS, JS, or other resource files only in your apps, but not your regular website.

You may also access the user agent directly via javascript with navigator.userAgent. To filter logic in javascript, you might use:

if (navigator.userAgent.indexOf('gonative') > -1) {
  // do something

Next Steps