Learn business growth with Google Analytics 4 Forums Google Analytics 4 Troubleshooting Firebase Integration Issue with Google Analytics 4 on Android

  • Troubleshooting Firebase Integration Issue with Google Analytics 4 on Android

    Posted by Liam on 7 February 2023 at 3:36 am

    I’m in the middle of integrating Firebase Google Analytics 4 with MParticle. Added this dependency: com.mparticle:android-googleanalyticsfirebasega4-kit:5+ and then a bunch of error messages started popping up:

    Apptimize: Apptimize did not detect Flurry. If you are using Flurry, then the most likely cause is ProGuard. Please consult the Apptimize docs for how to adjust your ProGuard configuration.

    You get the idea. There were similar messages for Google Analytics V3, V4, Mixpanel, Omniture 2.x, Adobe AppMeasurement 3.x, Adobe Mobile 4.x Config class, Adobe Mobile 4.x Analytics, Localytics, and Amplitude.

    Before I threw in the GA4 dependency, everything was smooth sailing. I set up Proguard based on these guidelines.

    Here are my dependencies:

    // mParticle
        mParticle = "com.mparticle:android-core:${versions.mParticle}"
        // mParticle Braze Kit
        braze = "com.mparticle:android-appboy-kit:${versions.mParticle}"
        // mParticle Apptimize Kit
        apptimize = "com.mparticle:android-apptimize-kit:${versions.mParticle}"
        // Adjust Kit
        adjustKit = "com.mparticle:android-adjust-kit:${versions.mParticle}"
        // Firebase for GA4
        mParticleGa4 = "com.mparticle:android-googleanalyticsfirebasega4-kit:${versions.mParticle}"
    

    I’ve done a few things so far:

    • Tweaked the dependency version across all packages
    • Checked out Proguard rules
    • Reached out to support 🙁

    And here’s my Proguard:

    -keep class com.apptimize.** { *; }
    -keepclassmembers class * extends com.apptimize.ApptimizeTest {
        <methods>;
    }
    
    -keep class android.support.v4.view.ViewPager
    -keepclassmembers class android.support.v4.view.ViewPager$LayoutParams { *; }
    -keep class android.support.v4.app.Fragment { *; }
    
    -keep class com.mixpanel.android.mpmetrics.MixpanelAPI { *; }
    -keep class com.google.android.gms.analytics.Tracker { *; }
    -keep class com.google.analytics.tracking.android.Tracker { *; }
    -keep class com.flurry.android.FlurryAgent { *; }
    -keep class com.omniture.AppMeasurementBase { *; }
    -keep class com.adobe.adms.measurement.ADMS_Measurement { *; }
    -keep class com.adobe.mobile.Analytics { *; }
    -keep class com.adobe.mobile.Config { *; }
    -keep class com.localytics.android.Localytics { *; }
    
    William replied 1 year ago 3 Members · 2 Replies
  • 2 Replies
  • Isaiah

    Member
    11 February 2023 at 10:34 am

    The issue you’re experiencing appears to be originating from the Firebase Google Analytics 4 dependency. When you add this to your project, it causes error messages from ProGuard, which is likely failing to recognize certain libraries within your project. The dependency version and ProGuard rules could be contributing to this issue. You may need to consult the documentation again in order to find the best settings for your project.

  • William

    Member
    28 February 2023 at 1:57 am

    The issue seems to stem from the new dependency com.mparticle:android-googleanalyticsfirebasega4-kit:5+ that you’ve added. However, these error messages could be just warnings, indicating that these specific libraries were not found. This might be the case if you do not have these libraries (Flurry, Google Analytics V3,V4, and so on) as dependencies in your project. If your app is functioning correctly, these messages may not be a cause for concern. However, if you are running into issues with your app’s functionality, you might need to look into these dependencies.

    For instance, the message Apptimize: Apptimize did not detect Flurry. If you are using Flurry, then the most likely cause is ProGuard. Please consult the Apptimize docs for how to adjust your ProGuard configuration. indicates that the Apptimize library did not find the Flurry library in your project. If you’re not using Flurry, you can safely ignore this message. But if you are using Flurry and Apptimize can’t see it, then you need to inspect your ProGuard configuration because it may not be properly configured to keep the Flurry classes from being obfuscated.

    The ProGuard configuration you’ve provided seems to be set up correctly and in line with the guidelines provided by mParticle on their GitHub page. If you’ve already tried tweaking the dependency versions and explored the ProGuard rules, then reaching out to support is a justifiable step. It would help if you got the exact dependency tree and their specified versions.

Log in to reply.