Closed JgomesAT closed 2 weeks ago
Hello @JgomesAT, Can you try this code instead of logScreenView(......)
for web.
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}) { logEvent( 'screen_view', parameters: <String, dynamic>{ 'screen_name': screenName, 'screen_class': className, "cookie_consent": CookieUtils.getCookieValue(CookieUtils.kCookieIdCookieGprd, encripted: false) == "true" ? "granted" : "denied", }, );
but the behavior is the same
in your example you put parameters: { 'firebase_screen': screen_name, 'firebase_screen_class': screen_name_class, },
I will change my code with your feedback and I'll say something
@JgomesAT Okay waiting for your reply.
I think isn't working, in GA4 I can see events of screen_view on web but with out screenNAme, and in Android and iOS its OK
Does it work on the firebase console?
HOw Can I Prove it in the firebase console?
In the firebase console I see the same info,
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 Language es-es
Page Location https://www.andorratelecom.ad/botiga/
Page Title Andorra Telecom
Screen Resolution 1920x1080 Session Count 1
Session ID 1715330811
ep.cookie_consent granted
ep.firebase_screen Dashboard_Particular
ep.firebase_screen_class minified:DE
ep.origin firebase
these two events are related to the name and class of screen_view:
ep.firebase_screen Dashboard_Particular
ep.firebase_screen_class minified:DE
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 firebase_screen_class
and firebase_screen_class
?
If so can you please confirm again if logScreenView
is working or not?
Thank you
I've just prepared a version of my code to rollback to the initial logScreenView , I will try and notify the behavior THX
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
snippet```yaml Replace this line with the contents of your `flutter pub deps -- --style=compact`. ```
Additional context and comments
No response