Filter out Your App in Your Website Analytics

Posted on 2. June 2021 by Jan Bunk

Image with text: Viewing Analytics for Your App

Just like you might be interested in seeing how users interact with your website, you might want to know how they use your app. You can do so by taking a look at your website analytics.

Filtering App Users

Of course you'll want to separate website users from app users in your analytics. You can do so by filtering by the used user agent. The user agent is a short string that the browser sends to websites. The user agent contains information about the browser, for example a Firefox browser could send something like this user agent:

Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0

User Agents Used by the App

The app uses a few different user agents:

  • WebView ($operatingSystem) $version
    This is the usual user agent used by the internal browser of the app. Requests made with this user agent are initiated by the app user. This is the user agent you should look for in your analytics.
  • HttpClient $version
    This is the user agent used for requests made by the app that are not directly initiated by the user. For example the app makes some requests with this to store parts of the website for offline use.

$version is the internal version of the app (e.g. 1.4.8+52) and $operatingSystem is the platform the app is being used on (e.g. ios or android).

Filtering By User Agent in Google Analytics

As an example, this is how to filter by user agent in Google Analytics:

  • Click 'Administration' on the left Click 'Administration' on the left
  • Click 'Segments' on the right Click 'Segments' on the right
  • Click 'New Segment' at the top and enter a name for it, for example 'App'.
  • Click 'Technology' Click 'Technology' on the left
  • Set the 'Browser' field to 'contains' & ' WebView'. If you wanted to create a segment for just iOS app users, set it to 'contains' & ' WebView (ios)' Entering text in the browser filter field
  • Click the save button at the top.
  • Now you can analyze app users almost everywhere in Google Analytics, just click 'Add segment' on a page where you're interested in app user behaviour. Now you can filter out app users almost everywhere in Google Analytics, just click 'Add segment' on a page where you're interested in app user behaviour.

Related Articles

Image with text: Updating and Editing Parts of Your App

Changing and Understanding the Structure of Your App

It can be a bit complex to differentiate between the various layouts you can choose for your app. In this article we clear up which parts of your app automatically update when you change your website, which changes you need to contact us for and when you will need to submit an update to the app stores.

Image with text: Staying Compliant with Export Regulations

Export Compliance in the App Store & Play Store

You need to pay attention to some export regulations because apps count as encryption software and app downloads count as exporting the app from the USA.

Image with text: Generating Keys & Signing Your App Yourself

Self-Sign Your Appbundles

How to generate keys & keystores and use them to sign your appbundle. Afterwards verify it and upload it to the Play Console.

Author Jan Bunk
Written by
Jan Bunk

This website is operated by me, Jan, and my team. I have previously developed a bunch of apps for clients and my own projects. Back in 2019 I noticed that none of the existing website to app converters provide the kind of service I'd expect as a customer. That inspired me to develop a better solution - By now, the apps I've created with my team have already been downloaded hundreds of thousands of times from the app stores.