firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.68k stars 3.97k forks source link

IOS does not report firebase_previous_screen with firebase analytics #7160

Closed dennisvanmaren closed 3 years ago

dennisvanmaren commented 3 years ago

Discussed in https://github.com/FirebaseExtended/flutterfire/discussions/7155

Originally posted by **dennisvanmaren** October 7, 2021 Hi With firebase analytics on Android we receive the firebase_previous_screen parameters but with IOS this field is empty. Anyone have any idea how to get the firebase_previous_screen values? We use FirebaseAnalytics().setCurrentScreen to set the current screenname when a screen transition occurs. ![image](https://user-images.githubusercontent.com/58005483/136331994-d8e1e6f3-1238-4c5f-80e9-5907969fe904.png) Thanks Dennis
darshankawar commented 3 years ago

@dennisvanmaren Can you provide flutter doctor -v and a self-contained minimal reproducible code sample that we can use to verify this ? Thanks.

dennisvanmaren commented 3 years ago

Hi darshankawar,

Thanks for helping, below the flutter doctor -v from codemagic which we are using for our IOS builds.

[✓] Flutter (Channel stable, 2.5.2, on macOS 11.4 20F71 darwin-x64, locale en-US) • Flutter version 2.5.2 at /Users/builder/programs/flutter_2_5_2 • Upstream repository https://github.com/flutter/flutter.git • Framework revision 3595343e20 (8 days ago), 2021-09-30 12:58:18 -0700 • Engine revision 6ac856380f • Dart version 2.14.3

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /usr/local/share/android-sdk • Platform android-S, build-tools 30.0.3 • ANDROID_HOME = /usr/local/share/android-sdk • ANDROID_SDK_ROOT = /usr/local/share/android-sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode-13.0.app/Contents/Developer • Xcode 13.0, Build version 13A233 • CocoaPods version 1.11.2

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] Connected device (1 available) • Chrome (web) • chrome • web-javascript • Google Chrome 94.0.4606.71

• No issues found!

dennisvanmaren commented 3 years ago

Accidently pressed the close button :-(

darshankawar commented 3 years ago

@dennisvanmaren Is it occuring in CI/CD ? or locally ? Are you able to replicate this behavior locally ? Can you try the official plugin example and see if you get same issue or not ? Thanks.

dennisvanmaren commented 3 years ago

Hi darshankawar,

Thanks to the example app we found the issue, the firebase_previous_screen was filled with IOS but the engagement_time_msec isn't available in IOS. Our SQL query filtered all events with no engagement time so it looks like we didn't receive any event with firebase_previous_screen.

We also found the following information regarding IOS and engagement_time_msec link

It is also discussed here Link

Will send a message to firebase support to see if they will include the engagement_time_msec in the screen_view events.

Thanks for your help

Dennis

darshankawar commented 3 years ago

Thanks for identifying the root cause and providing updates here. I am going ahead and closing this as non-issue.