firebase / firebase-android-sdk

Firebase Android SDK
https://firebase.google.com
Apache License 2.0
2.28k stars 578 forks source link

Firebase Analytics inconsistency in project dashboard #3480

Closed abanoubdev closed 2 years ago

abanoubdev commented 2 years ago

[REQUIRED] Step 2: Describe your environment

[REQUIRED] Step 3: Describe the problem

We are implementing Ads SDK and using firebase to log ad events ,following this link : https://firebase.google.com/docs/analytics/get-started?platform=android

Events are fired successfully from my side and checked the Debug view and it is good from development side ,but it is not viewed consistently at project dashboard even i waited the whole day for it and you can find below project dashboard : https://console.firebase.google.com/u/0/project/hybid-demo/analytics/app/android:net.pubnative.lite.demo/events/~2Foverview%3Ft%3D1645697181435&fpn%3D786277539067&swu%3D1&sgu%3D1&sus%3Dupgraded&params%3D_r..layout.pageNumber%253D0%2526_u..pageSize%253D25%2526_u.dateOption%253Dyesterday&cs%3Dapp.m.events.overview&g%3D1

Steps to reproduce:

1- Just run attached APK file 2- select 4 and press interstitial button 3- click load and then click show 4-Ad will be viewed there ,press mute and unmute multiple times 5-when video is finished ,press close button 6- check debug tab and click See Event Report 7- you will all events that should be fired on Firebase dashboard 8- after these events are reflected , you can find the inconsistency there

Relevant Code:

override fun onEvent(event: ReportingEvent?) {
        if (event != null) {
            if (event.eventType != null && event.eventType.equals(Reporting.EventType.REQUEST))
                clearEventList()
            eventList.add(event)

            if (event.eventObject != null) {
                Log.d("onEvent Log", event.eventType)
                val bundle = Bundle()
                for (key in event.eventObject.keys()) {
                    bundle.putString(key, event.eventObject[key].toString())
                }

                mFirebaseAnalytics?.setDefaultEventParameters(bundle)

                mFirebaseAnalytics?.logEvent(event.eventType, bundle)
            }
        }
    }
google-oss-bot commented 2 years ago

I found a few problems with this issue: