0
votes

My app uses Firebase messaging and Google analytics. I am using this code to setup GAI:

        var configureError: NSError?
        GGLContext.sharedInstance().configureWithError(&configureError)

        if let error = configureError {
            print("Error configuring Google services: \(error)")
        }

        let gai = GAI.sharedInstance()
        gai?.optOut = true
        gai?.trackUncaughtExceptions = true
        gai?.logger.logLevel = GAILogLevel.verbose
        gai?.dispatchInterval = 120

        _ = gai?.tracker(withTrackingId: FWKeys.googleTrackingID)

but on this step console says that I am using Firebase analytics instead:

<FIRAnalytics/INFO> Firebase Analytics enabled

Google analytics console doesn't show any active users when I start the app. Why is this happening?

UPD: For some reason information in the Analytics console started updating. But I am still wondering why there is "Firebase Analytics enabled" in the log while I am setting up GAI.

1

1 Answers

2
votes

When you use any Firebase feature, such as Firebase Cloud Messaging in your case, the Firebase SDK also enabled Firebase Analytics. This does not replace Google Analytics, it is an additional analytics solution on top.

To disable Firebase Analytics, see the instructions in this answer: How to disable/remove FirebaseAnalytics.