Select your language

This article should provide the necessary information on how to setup legacy Google Analytics app screenview tracking through GTM v2 for Apps (Firebase).

Google promotes Firebase as the future app toolset and tracking platform. Nevertheless, the available reports and features are still not offering the same kind of functionality compared to the legacy Google Analytics app tracking. Therefore, in some constellations Google itself recommends to implement a combination of Firebase with GTM v2 for apps and legacy GA app tracking through GTM. Unfrortunately, the available documentation on how to implement the legacy screenview tracking for GA through GTM v2 for apps is not really satisfying.

Firebase itself offers a fully automated screeview tracking by just incorporating the Firebase library in your according app project. Using this default automated screenview tracking, Firebase will record a screenviews each time a new Activity (Android) or UIViewController (iOS) is displayed on the screen. In terms of screenview parameters, it loggs a generated unique screen id and the name of the according Activity or UIViewController class.

If you want to manually track screenviews, you can call a method called setCurrentScreen (Android) or setScreenName (iOS) which then logs a screenview with the name passed to the corresponding fucntion (which might be more suitable in case you want to provide own screen names for your tracking). Unfortunately, you cannot switch off just the automated screenview tracking and use the manual screenview tracking only, which is not optimal from my point of view. Especially on iOS you often have multiple UIViewControllers per screen, so the tracked screenviews do not really correspond to a single screen.

 How to track the Firebase screenviews with legacy Google Analytics app tracking with GTM v2 for Apps:

 

1. Setup a trigger for the event screen_view in your GTM app tracking container

gtm firebase ga legacy screen view trigger

 

2. Add the following variables of type "Event Parameter" in GTM:

  • _sn  = Screen Name
  • _si   = Screen Id
  • _sc  = Screen Class

 

3. Finally add a Universal Analytics tag which fires at the screen_view event trigger and which passes the corresponding values in the screenName field (in my case, I passed all three parameters as a combination, you might also pass the screen name only).

gtm firebase ga legacy screen view tag