How to fire Google Analytics tag using Firebase + Google Tag Manager SDK in Android? I added the Firebase container to my assets/container folder and creat
Google Tag Manager needs to be added as a separate dependency; see the documentation for doing so here:
Google Tag Manager for Android
In short:
Add to your module's gradle file:
dependencies {
// ...
implementation 'com.google.android.gms:play-services-tagmanager:[latest-version]'
}
Download the container file and add it to /assets/containers
.
You should enable debug logging for both FirebaseAnalytics and Google Tag Manager and look at the logcat. It will likely answer your question.
You can enable Scion debug logs
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb shell setprop log.tag.GoogleTagManager VERBOSE
adb logcat -v time -s FA FA-SVC GoogleTagManager
View events in Android Studio debug log
TagManager is a separate library from Firebase Analytics. In order to use it in your app you need to add dependency on the tag manager form Google play services. When Firebase Analytics starts it will check for the presence of TagManager in the app and print message in logcat. If the message print TagManager not found you don't have the TagManager in your app. When TagManager is available you will see message like "TagManager found, initializing"