Google Analytics (Firebase)
Google Analytics helps you to understand users' behavior in your apps. It includes Google out-of-the-box events and Zapp analytics events, which enables you to make your app more effective: improve user experience, engagement and retention, reduce acquisition costs, etc.
Platforms that are based on Android & Apple operating systems (iOS, Android, tvOS, Android TV and Fire TV) use Google Analytics for Firebase SDK.
Web-based platforms (Samsung TV and LG TV) use Google Analytics 4 API as clients.
Google Analytics integration
Pre-requisites
- Google Firebase account, which linked to a Google Analytics 4 account.
- google-servises.json (for Android, Android TV and Fire TV).
- GoogleService-info.plist (for iOS and tvOS).
- Measurement ID of the data stream (for Roku, LG TV and Samsung TV).
- Measurement Protocol API Secret Key (for Samsung TV).
iOS and tvOS
Add the plugin "Google Analytics for Firebase" to the app.
Add the plugin "Firebase Base Setting 2.0" to the app.
Upload the GoogleService-Info.plist retrieved from your Google Firebase Project in the settings section. In case your iOS and tvOS apps are using the same bundle ID, please use the same plist for iOS and tvOS.
Android, Android TV and Fire TV
Add the plugin "Google Analytics for Firebase" to all versions.
Upload the google-servises.json retrieved from your Google Firebase Project in the settings section of the version. In case your different Android-based apps are using the same bundle ID, please use the same json for Android, Android TV and Fire TV.
Samsung TV, LG TV and Roku
Add the plugin "Quick Brick Google Analytics 4" to all versions.
Add the Measurement ID from the Google Analytics web data stream.
Read here how to create a new data stream and get the measurement ID in Google Analytics.
Starting Zapp V9 LG TV will use remote bundle and Google Analyics will work with no additional plugin configurations. On older Zapp versions or local bundles builds, Google Analyics will work for LG TV only when using the Measurement Protocol API (Google Analytics will not work using local bundles due to Google Analytics SDK changes).
Google Analytics for Samsung TV will work only when using the Measurement Protocol API.
Samsung TV - Measurement Protocol API
To setup the plugin to use the Measurement Protocol API, open the advance section, enable the Use Measurement Protocol
, and add your Measurement Protocol API Secret
(in addition to the Measurement ID you already setup before).
Watch here how to generate your Measurement Protocol API Secret Key in Google Analytics.
According to Google guides, using the Measurement Protocol means that some information, such as geolocation, will not be included.