For the complete documentation index, see llms.txt. This page is also available as Markdown.

Custom User Agent

Tell your website when a visit comes from the app.

Every request a browser makes carries a user agent — a line of text identifying what is asking. Custom User Agent adds your own text to the one your app sends, so your website can tell an app visit from an ordinary mobile browser visit.

That matters whenever your site should behave differently inside the app: hiding a "Download our app" banner, skipping a cookie notice you have already handled, or routing app traffic differently in your analytics.

Turn it on

Open Native Features → Custom User Agent and switch on Enable Custom User Agent.

The Custom User Agent screen with separate Android and iOS fields
Setting
What it does

Android User Agent

Text sent with every request from the Android app.

Attach with actual android user agent

Append your text to the real user agent instead of replacing it.

iOS User Agent

Text sent with every request from the iOS app.

Attach with actual iOS user agent

Append your text to the real user agent instead of replacing it.

Click Save as draft.

Choosing your text

Something short and distinctive you can match on — mobile-app, or your brand plus the word app. Avoid anything that looks like a real browser name, or you will confuse the tools trying to parse it.

You can use the same value on both platforms, or different ones if you want to tell Android and iOS traffic apart.

Detecting it on your site

Check whether your string appears in the user agent. In JavaScript:

Server-side, read the User-Agent request header and look for the same string.

If you only need to hide a banner or tweak a layout inside the app, Hide Elements and Custom CSS do that without touching your website's code.

Check it

Open your app in Twinr Preview and load a page that reports the user agent, or watch your server logs. Your string should appear on every request from the app, and on none from a mobile browser.

Last updated