Switch from Fabric Answers to Google Analytics

To complete your app’s migration from Fabric to Firebase, you’ll need to switch over from using Fabric Answers to Google Analytics. Analytics provides the same features you had in Fabric and also allows you to integrate your events data with other powerful services, such as Firebase Crashlytics and FCM. This help page describes how to switch from Answers to Analytics and provides answers to our most frequently asked questions.

If you haven’t begun migrating your Fabric app to Firebase yet, head to the Start migrating section of the Migrate to Firebase workflow.

Before you begin

If you haven’t already, add the Google Analytics SDK to your app.

Step 1: Replace Answers events with Analytics events

  1. In your Xcode or Android Studio workspace, replace all calls to Answers events with their Analytics event counterparts. Use the conversion tables below to make your updates:

Convert events for iOS

Answers Event Analytics Event (Objective-C) Analytics Event (Swift)
logPurchaseWithPrice kFIREventEcommercePurchase AnalyticsEventEcommercePurchase
logAddToCartWithPrice kFIREventAddToCart AnalyticsEventAddToCart
logStartCheckoutWithPrice kFIREventBeginCheckout AnalyticsEventBeginCheckout
logContentViewWithName kFIREventViewItem AnalyticsEventViewItem
logSearchWithQuery kFIREventSearch AnalyticsEventSearch
logShareWithMethod kFIREventShare AnalyticsEventShare
logRating (No direct corollary) (No direct corollary)
logSignUpWithMethod kFIREventSignUp AnalyticsEventSignUp
logLoginWithMethod kFIREventLogin AnalyticsEventLogin
logInviteWithMethod (No direct corollary) (No direct corollary)
logLevelStart kFIREventLevelStart AnalyticsEventLevelStart
logLevelEnd kFIREventLevelEnd AnalyticsEventLevelEnd

Convert events for Android

Answers Event Analytics Event
logAddToCart ADD_TO_CART
logStartCheckout BEGIN_CHECKOUT
logContentView VIEW_ITEM
logSearch SEARCH
logShare SHARE
logRating (No direct corollary)
logSignUp SIGN_UP
logLogin LOGIN
logInvite (No direct corollary)
logLevelStart LEVEL_START
logLevelEnd LEVEL_END

Step 2: Disable Answers reporting from Fabric

  1. On your Fabric Dashboard, click Settings > Apps.
  2. Select your app, then click Disable Analytics.

Your app is now configured to use Google Analytics.

Frequently Asked Questions

I switched my app from using Fabric Answers to Google Analytics. Why aren’t my metrics lining up?

You may see discrepancies in your metrics (e.g., your app’s monthly active users) because Fabric and Firebase use different SDKs to calculate crash-free user statistics and metrics. The Fabric SDKs are powered by Answers, whereas the Firebase SDKs are powered by Google Analytics.

Several things may cause Answers to discard events that might have led to a session. For example, as long as an app switches to a foreground state within 30 seconds of being backgrounded, Answers reports all states as a single session as opposed to separate sessions. If something occurs that prevents a background event from being detected, Answers does not count the prior foregrounding event as part of the session.

With Analytics, however, a user_engagement event must be triggered to capture activity. A user_engagement event is triggered when a user interacts with the app for a minimum duration (set to 10 seconds by default), which you can control using the setMinimumSessionDuration() method call. As long as an app switches to a foreground state within 30 minutes of being backgrounded, Analytics counts both states as part of the same session.

In many instances, we see Answers counting more sessions and users than Analytics because it requires an app to spend less time in a foreground or background state before it captures a session or an active user. This results in small discrepancies for high-volume apps, and potentially larger discrepancies for low-volume apps that manage fewer users and sessions per day.

After I switch to Google Analytics, will I still be able to access my old Answers data?

Your previous Fabric Analytics events data will not appear in Firebase. You can still access historical Fabric Analytics data in your Fabric Dashboard until the sunset date of May 4, 2020.

I can’t find the Analytics replacement of a specific event in my app. What should I do?

You can find all predefined events for Firebase and instructions on creating custom event types in the FirebaseAnalytics.Event reference documentation for Android and iOS (Swift or Objective-C).