-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [firebase_analytics] Screen_view/page_view and user_engagement events are not being sent for web #4910
Comments
I'm seeing this as well on the latest master flutter doctor -v[√] Flutter (Channel master, 1.26.0-18.0.pre.156, on Microsoft Windows [Version 10.0.19041.746], locale et-EE)
• Flutter version 1.26.0-18.0.pre.156 at C:\Development\flutter_master
• Framework revision 45508985b1 (6 hours ago), 2021-02-02 22:46:04 -0500
• Engine revision 2c144c3eeb
• Dart version 2.12.0 (build 2.12.0-282.0.dev)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users\marku\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\201.7042882\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.7)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.7.30621.155
• Windows 10 SDK version 10.0.18362.0
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\201.7042882
• 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-b01)
[√] Connected device (4 available)
• SM G950F (mobile) • ce12171c51cc001c03 • android-arm64 • Android 9 (API 28)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19041.746]
• Chrome (web) • chrome • web-javascript • Google Chrome 88.0.4324.104
• Edge (web) • edge • web-javascript • Microsoft Edge 88.0.705.56
• No issues found! |
Any ideas what causes it? Have not found any workarounds for now... |
Not sure, analytics web support should be official so it should work fine but I've had a hard time getting the events to register in general. Can't really offer a workaround, will have to wait until this gets investigated. |
I have the same issue for flutter web beta and 2.0. Events seem to be showing in the firebase console but screen views aren't. Using the Chrome firebase Analytics debugger extension shows the screen view "events" are being fired. But there is nothing in the Firebase / GA consoles or stream views. The only page view event happens on app start which shows the app name as the page view and "main activity" |
Seeing this on 2.2.3 as well. Inspected FirebaseAnalyticsObserver under the debugger and it is running as expected (i.e. it successfully extracts the screen name and calls |
I can also confirm. No screen events fired on web but custom events work fine. Would be great to get this fixed to prevent seeing skewed data. |
This seems related: googlearchive/firebase-dart#312 |
Is anyone able to connect to debug view in firebase console using the chrome extension. I am on flutter beta. I can't even see my app in debug view. |
Same issue on web. Unable to manually track screen views with
|
I also cannot get I am using function: firebaseAnalytics.setCurrentScreen(screenName: screenName); I see this output in the browser console, however, there is no data logged to Firebase analytics in the normal view or the debug view.
I am assuming that the implementation is just broken. Workaround / SolutionUse the Web / iOS / Android consistent Analytics screen_view tracking if (kIsWeb) {
firebaseAnalytics.logEvent(name: "screen_view", parameters: {
'firebase_screen': screenName,
'screen_name': screenName,
});
} else {
firebaseAnalytics.setCurrentScreen(screenName: screenName);
} This works successfully, and shows the screen_view in the debug view, with the screen_name attached for web. For iOS / Android, the debug view does not show screen_name, rather, it shows firebase_screen only. However, in the full analytics view, I am able to correctly see the screen_name for all 3 platforms (web / ios / android). I include firebase_screen on web for consistency reasons. This data is visible in the full analytics view under Life cycle -> Engagement -> Engagement overview -> USERS IN LAST 30 MINUTES (box) -> Top Pages & Screens. UPDATEI've updated my implementation because Google Analytics combines Screen Name and Page Title into the same metric / field in many reports. iOS / Android / Web were reporting Page Title differently. Since I personally only care about "screen_name", this tracking style will report screen name and page title identically, making the reports work better (especially the "explore" funnel / path reports). The analytics plugin will still report "page view" separately from "screen view" - page view evidently being the "entrance" to the app, and screen view being transitions within the app. We don't seem to have any control over "page view" which is being done automatically. I am using this code to only log screen_view to get the more consistent cross-platform output. This makes sense for me using a router compatible with web, and my screen names are basically all url path templates which work identically across ios / android / web. There are no longer confusing differences of "page_title" and "screen_name" being shown in Analytics. The data is uniform. This is the same for all platforms. firebaseAnalytics.logEvent(name: "screen_view", parameters: {
'screen_name': screenName,
'page_title': screenName,
}); |
Hey @SaltumDis, Firebase Analytics plugin was reworked & released in December 2021. Are you able to confirm if you're still experiencing the same problem for the latest version? Thanks. |
@russellwheatley yes, this issue still persists with firebase_analytics: ^9.0.5 |
Hey @SaltumDis, I've just tested the analytics example and used the Google Analytics Debugger to test. Events were being fired on every screen transition. Could you provide a reproducible sample, please? |
@russellwheatley As far as I remember, I think they always show as triggered, but they just never show up properly in Google Analytics, so one would need to verify that they actually do show up correctly in GA. |
Hey @SaltumDis. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @SaltumDis if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
When using firebase_analytics for web events are sent only on refresh
I am using FirebaseAnalyticsObserver. For mobile it works, but for web - events are only sent when I open page for the first time or refreshed. 😿
Have also tried using custom navigatorObserver and sending
page_view
events on navigation - would receive them, but would not get any user engagement data.Flutter doctor
Click To Expand
Flutter dependencies
Click To Expand
The text was updated successfully, but these errors were encountered: