📖 View this page in our documentation

User agent is useful for detecting usage coming from your app. You may recognize traffic coming from the app by looking at the user agent.

You may specify your own custom user agent by selecting the Custom option and then providing your custom user agent. By default, we append the following strings to the end of the user's default user agent on their device:

iOS app - we append GoNativeIOS/1.0 gonative
Android app - we append GoNativeAndroid/1.0 gonative

The user agent comes across 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
}