How to detect an in-app browser

User-agent markers can suggest which app opened a page. They are a heuristic, not a reliable test of browser capabilities or whether a store handoff succeeded.

19 October 2026 ยท PAD team

On this page

  1. Use detection as a hint
  2. Test behavior separately
  3. What telemetry can establish
  4. Set up your link
  5. Questions

Use detection as a hint

Apps can alter or remove identifiers, and user agents can be spoofed. A browser classification is useful for choosing help text and grouping observations. It should not decide authentication, access control or whether a visitor is a real person.

function socialBrowserHint(ua = navigator.userAgent) {
  if (/Instagram/i.test(ua)) return 'instagram';
  if (/FBAN|FBAV/i.test(ua)) return 'facebook';
  return 'unknown';
}

This deliberately small example returns unknown for many embedded browsers. It does not infer Safari merely because no social-app marker is present. Maintain detection against user agents you have actually observed, with regression examples for both matches and non-matches.

Test behavior separately

What telemetry can establish

A page that remains visible after a delay may have failed to hand off, or the visitor may have returned. A fallback-button event proves a click on that button. Neither event confirms store arrival. See the public dataset methodology before interpreting GoToApp browser counts.

Set up your link

Read the app-link handbook and configure social link fallbacks.

Questions

Can a user agent prove which browser is open?

No. It can contain useful markers, but they may be missing, changed or spoofed.

Does an absent visibility event prove a successful store opening?

No. Page lifecycle events cannot reliably establish store arrival or installation.

Create a GoToApp link with your destinations, then test it on the devices and channels you plan to use. Free for up to three projects.

Create a link

Related