Google Analytics

  1. SDK Version: 36
  2. Platforms(Android/iOS/web/all): Android/iOS

Is there any support/library to use Google Analytics in expo apps? I tried to use this library https://github.com/ryanvanderpol/expo-analytics, but it is yet to resolve web + app project issues for a long time.

I don’t see any working GA library for expo. I would appreciate if anyone can suggest me one.

We have been using expo-analytics in production for over a year. It works on android, ios and web just fine.

You have to make sure that you use the old method (web only) and not the newer App + Web project on the GA side. You can ensure this by checking you have a UA-XXX* token and not a G-XXX* token.

The difference is explained here. You’re perfectly fine using the older method.


If you DON’T want that, and you DON’T want to eject, as far as I can tell, the only way is to use FireBase Analytics.

Thanks derk-jan. Yes, the old method works fine. But can GA tell whether the data came from the actual mobile apps and from the website?

Yes. The easiest way is to set a custom user property for the session, but you can always* use known properties, such as the browser, to segment on this. Here are the analytics for our demo application:

These values map like this:

name source
Safari (in-app) Mobile Application on iOS
Android Runtime Mobile Application on Android
Everything else (Chrome in this case) Web

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.