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.64k stars 3.96k forks source link

🐛 [firebase_analytics] FirebaseAnalytics.instance.logCampaignDetails does not work #10107

Closed carlosfiori closed 4 months ago

carlosfiori commented 1 year ago

Bug report

Describe the bug I'm trying to use FirebaseAnalytics.instance.logCampaignDetails for re-engagement but it doesn't seem to be working, after calling the method, I look for the UTMs I passed as parameters in Analytics and I can't find it, even the campaign_details event is not shown in Firebase DebugView.

Steps to reproduce

Steps to reproduce the behavior:

  1. Call
    FirebaseAnalytics.instance.logCampaignDetails(
    source: 'source_test',
    medium: 'medium_test',
    campaign: 'campaign_test',
    );
  2. Check in the DebugView that the campaign_details event was not triggered

Expected behavior

Receive the campaign_details events on DebugView and analytics.

Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.3.9, on macOS 12.6 21G115 darwin-arm, locale pt-BR) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 13.4.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.3) [✓] VS Code (version 1.74.0) [✓] Connected device (3 available) [✓] HTTP Host Availability • No issues found! ```

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand ``` Dart SDK 2.18.5 Flutter SDK 3.3.9 game_manager 1.0.0+1 dependencies: - assorted_layout_widgets 7.0.0 [clock flutter matrix4_transform] - autoequal 0.5.1 [meta] - bloc 8.1.0 [meta] - cloud_firestore 4.2.0 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - copy_with_extension 4.0.4 - cupertino_icons 1.0.5 - dartz 0.10.1 - equatable 2.0.5 [collection meta] - event_bus 2.0.0 - firebase_analytics 10.0.7 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_core 2.4.0 [firebase_core_platform_interface firebase_core_web flutter meta] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_bloc 8.1.1 [flutter bloc provider] - get_it 7.2.0 [async collection] - go_router 5.2.4 [collection flutter flutter_web_plugins logging meta] - injectable 1.5.4 [get_it] - intl 0.17.0 [clock path] - json_annotation 4.7.0 [meta] - logger 1.1.0 dev dependencies: - autoequal_gen 0.5.1 [analyzer build source_gen autoequal equatable] - build_runner 2.3.0 [args async analyzer build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http_multi_server io js logging meta mime package_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml] - copy_with_extension_gen 4.0.4 [analyzer build source_gen copy_with_extension] - dart_code_metrics 4.19.2 [analyzer analyzer_plugin ansicolor args collection crypto file glob html meta path source_span xml yaml] - flutter_lints 2.0.1 [lints] - flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph] - go_router_builder 1.0.15 [analyzer async build build_config collection meta path path_to_regexp source_gen source_helper] - injectable_generator 1.5.5 [build source_gen path glob analyzer code_builder dart_style injectable collection] - json_serializable 6.5.4 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper] - mocktail 0.3.0 [collection matcher test] transitive dependencies: - _fe_analyzer_shared 47.0.0 [meta] - _flutterfire_internals 1.0.10 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - analyzer 4.7.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - analyzer_plugin 0.10.0 [analyzer collection dart_style pub_semver yaml] - ansicolor 2.0.1 - args 2.3.1 - async 2.9.0 [collection meta] - boolean_selector 2.1.0 [source_span string_scanner] - build 2.3.1 [analyzer async convert crypto glob logging meta path] - build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml] - build_daemon 3.1.0 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel] - build_resolvers 2.0.10 [analyzer async build crypto graphs logging path package_config pool pub_semver stream_transform yaml] - build_runner_core 7.2.7 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pool timing watcher yaml] - built_collection 5.1.1 - built_value 8.4.2 [built_collection collection fixnum meta] - characters 1.2.1 - checked_yaml 2.0.1 [json_annotation source_span yaml] - clock 1.1.1 - cloud_firestore_platform_interface 5.9.1 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface] - cloud_firestore_web 3.1.1 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js] - code_builder 4.3.0 [built_collection built_value collection matcher meta] - collection 1.16.0 - convert 3.1.1 [typed_data] - coverage 1.6.1 [args logging package_config path source_maps stack_trace vm_service] - crypto 3.0.2 [typed_data] - csslib 0.17.2 [source_span] - dart_style 2.2.4 [analyzer args path pub_semver source_span] - fake_async 1.3.1 [clock collection] - file 6.1.4 [meta path] - firebase_analytics_platform_interface 3.3.15 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.5.1+6 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_core_platform_interface 4.5.2 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 2.0.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - fixnum 1.0.1 - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - frontend_server_client 2.1.3 [async path] - glob 2.1.1 [async collection file path string_scanner] - graphs 2.2.0 [collection] - html 0.15.1 [csslib source_span] - http_multi_server 3.2.1 [async] - http_parser 4.0.2 [collection source_span string_scanner typed_data] - io 1.0.3 [meta path string_scanner] - js 0.6.4 - lints 2.0.1 - logging 1.1.0 - matcher 0.12.12 [stack_trace] - material_color_utilities 0.1.5 - matrix4_transform 2.0.1 [flutter] - meta 1.8.0 - mime 1.0.3 - nested 1.0.0 [flutter] - node_preamble 2.0.1 - package_config 2.1.0 [path] - path 1.8.2 - path_to_regexp 0.4.0 - petitparser 5.1.0 [meta] - plugin_platform_interface 2.1.3 [meta] - pool 1.5.1 [async stack_trace] - provider 6.0.4 [collection flutter nested] - pub_semver 2.1.3 [collection meta] - pubspec_parse 1.2.1 [checked_yaml collection json_annotation pub_semver yaml] - shelf 1.4.0 [async collection http_parser path stack_trace stream_channel] - shelf_packages_handler 3.0.1 [path shelf shelf_static] - shelf_static 1.1.1 [convert http_parser mime path shelf] - shelf_web_socket 1.0.3 [shelf stream_channel web_socket_channel] - sky_engine 0.0.99 - source_gen 1.2.6 [analyzer async build dart_style glob meta path source_span yaml] - source_helper 1.3.3 [analyzer collection source_gen] - source_map_stack_trace 2.1.1 [path source_maps stack_trace] - source_maps 0.10.11 [source_span] - source_span 1.9.0 [collection path term_glyph] - stack_trace 1.10.0 [path] - stream_channel 2.1.0 [async] - stream_transform 2.1.0 - string_scanner 1.1.1 [source_span] - term_glyph 1.2.1 - test 1.21.4 [analyzer async boolean_selector collection coverage http_multi_server io js node_preamble package_config path pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel typed_data web_socket_channel webkit_inspection_protocol yaml test_api test_core] - test_api 0.4.12 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher] - test_core 0.4.16 [analyzer async args boolean_selector collection coverage frontend_server_client glob io meta package_config path pool source_map_stack_trace source_maps source_span stack_trace stream_channel vm_service yaml matcher test_api] - timing 1.0.0 [json_annotation] - typed_data 1.3.1 [collection] - vector_math 2.1.2 - vm_service 9.4.0 - watcher 1.0.2 [async path] - web_socket_channel 2.2.0 [async crypto stream_channel] - webkit_inspection_protocol 1.2.0 [logging] - xml 6.1.0 [collection meta petitparser] - yaml 3.1.1 [collection source_span string_scanner] ```

darshankawar commented 1 year ago

Thanks for the report @carlosfiori I think currently the source, medium, campaign and utm parameters are most probably not being sent to GA, but I could be wrong. Can you provide an example of what functionality are you looking to implement using these parameters ?

carlosfiori commented 1 year ago

Hi @darshankawar I'm trying to re-engage the user, for example if I send a push notification or the user clicks a deep link with utm parameters, those utms must be appended in all conversions and events sent to GA.

darshankawar commented 1 year ago

Thanks for the update. Per my earlier comment, the said params may not be being sent to GA from Flutter currently, so keeping this issue open for team's attention and insights. There was a similar old issue: https://github.com/firebase/flutterfire/issues/1534

russellwheatley commented 8 months ago

Hey @carlosfiori - what platform are you referring to in this issue?

carlosfiori commented 8 months ago

Hi @russellwheatley, on iOS and Android

ocastx commented 5 months ago

any updates?

russellwheatley commented 5 months ago

This isn't something erroneous on FlutterFire Analytics, we haven't changed the way we log events in a very long time.

I checked our example app, and it is logging events, but you are correct in that it doesn't appear to log campaign details in the debug view. I would suggest reaching out to Firebase support and finding out if this expected as there is nothing for FlutterFire to fix if certain events are not appearing in the Firebase console debug view.

google-oss-bot commented 5 months ago

Hey @carlosfiori. 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!

MatteoAntolini commented 5 months ago

I'm currently having the same issue with firebase_analytics. The events are logged but there is no data about the campaing parameters

google-oss-bot commented 4 months ago

Hey @carlosfiori. 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!

google-oss-bot commented 4 months ago

Since there haven't been any recent updates here, I am going to close this issue.

@carlosfiori 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.