-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[firebaseAnalytics]: logScreenView doesn't send the name and class to GA4 in flutter web #12751
Comments
Hello @JgomesAT, Can you try this code instead of analytics.logEvent(
name: 'screen_view',
parameters: {
'firebase_screen': screen_name,
'firebase_screen_class': screen_name_class,
},
); |
I just found this option and since the last week I have this code: static void logScreenView(String screenName, String className, {Map<String, dynamic>? parameters}) {
in your example you put I will change my code with your feedback and I'll say something |
@JgomesAT Okay waiting for your reply. |
Does it work on the firebase console? |
HOw Can I Prove it in the firebase console? |
I've tested using this chrome extension and I found that data is being sent correctly via the SDK. Can you please try and see if that's the case for you also? https://chromewebstore.google.com/detail/taghound-analyticsgtmpixe/canpneabbfipaelecfibpmmjbdkiaolf |
OK, thanks I will try this extension |
I can see this: Event Data 10 Page Location Page Title Screen Resolution Session ID ep.cookie_consent ep.firebase_screen ep.firebase_screen_class ep.origin these two events are related to the name and class of screen_view: ep.firebase_screen ep.firebase_screen_class I don't understand the class minified:DE this Is not a class of my project |
In the screen_class I set the same value as screen_name and now I Can see values the problem was the value of screen_class |
Based on the snippet you've shared, it seems like it correctly reports screen_view to GA, but the issue might be on the backend side. Does the issue still happens? |
It seems that is now working, I can see the screen's name in the GA4 for the web, I force for now in the attribute screenClass the same value of screenName |
What snippet of cope you used the one with If so can you please confirm again if Thank you |
I've just prepared a version of my code to rollback to the initial logScreenView , I will try and notify the behavior |
I have data in GA4!, I think all the problems were related to the codification of screenClass thanks for the support |
Glad to hear that the issue have been resolved 🥳 |
Is there an existing issue for this?
Which plugins are affected?
Analytics
Which platforms are affected?
Web
Description
I have this code FirebaseAnalytics.instance.logScreenView(screenName: screenName, screenClass: className);
to send the event to screenView, and in the Ga4 I can see the events of screenView but without screenName and screenClass,
this only happened with Flutter Web in Android and iOS work perfectly.
other events in the web dork fine like purchase ¡, in this case, I can see all parameters of the event.
Reproducing the issue
Create an event with this faclility FirebaseAnalytics.instance.logScreenView(screenName: screenName, screenClass: className);
Firebase Core version
2.30.1
Flutter Version
3.19.6
Relevant Log Output
No response
Flutter dependencies
Expand
Flutter dependencies
snippetReplace this line with the contents of your `flutter pub deps -- --style=compact`.
Additional context and comments
No response
The text was updated successfully, but these errors were encountered: