urltoapp.dev
Learn

Measuring your URL app in Google Analytics

Once the app is live, the first question is “is anyone using it?” By default, app visits look like mobile Chrome visits. Two small changes fix that.

Updated Oct 20262 min readurltoapp.dev

Short answer

Mark app sessions in two ways: add a clean parameter to the start URL (for example ?utm_source=android_app&utm_medium=app) so the first page view is attributed to the app, and detect the app on every page (its user agent contains ; wv) or your converter's token) to set a GA4 user property such as platform=android_app. Then compare app and web users in any report.

Step 1: tag the start URL

Only the first page of each session carries the parameters, which is enough for GA4 to attribute the session. Use the app UTM link builder to strip old campaign tags and add a consistent set.

Step 2: detect the app on every page

var inApp = /; wv\)/.test(navigator.userAgent);
if (inApp) {
  document.documentElement.classList.add('in-app');
  gtag('set', 'user_properties', { platform: 'android_app' });
}

Register platform as a user-scoped custom dimension in GA4 (Admin → Custom definitions). The app mode snippet generator writes this with your converter's token too.

Step 3: compare

  • Engagement: app users usually have more sessions per user — the icon is a constant reminder.
  • Conversion: compare checkout or sign-up rates for platform = android_app vs everyone else.
  • Pages: what app users open first tells you whether the start URL is right.

Installs are in Play Console, not GA

Google Play Console reports installs, uninstalls, ratings and crashes. To know where installs came from, use Play's referrer: links to your Play listing can carry &referrer=utm_source%3D..., and Play Console's acquisition reports group by source.

Your cookie banner appears again in the app because cookies are separate from Chrome. Respect the choice the same way; mention analytics in Play's Data Safety form.

FAQ

Does Google Analytics work in a WebView app?

Yes, the web GA4 tag works normally inside the WebView. You just need to label the sessions as app traffic.

Can I use Firebase Analytics instead?

That requires the native Firebase SDK in the app shell. For a URL app, web GA4 with a platform property is usually enough.

Read next