Skip to content
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] Event log in incorrect platform after calling "logCampaignDetails" #11958

Open
felixkwok2 opened this issue Nov 29, 2023 · 9 comments
Labels
platform: all Issues / PRs which are for all platforms. plugin: analytics type: bug Something isn't working

Comments

@felixkwok2
Copy link

felixkwok2 commented Nov 29, 2023

Bug report

I am trying to log the utm parameter by calling "FirebaseAnalytics.instance.logCampaignDetails" in flutter
After calling this function, I found that all the following events are logged as "Android Platform" even I am using an iOS real device

If "logCampaignDetails" is not called, events are logged in correct platform (Android and iOS)

Steps to reproduce

Steps to reproduce the behavior:

  1. Call the following code (flutter) after "FirebaseAnalytics" ready
      String platform = "unknown";
      if (Platform.isIOS) {
        platform = "ios";
      } else if (Platform.isAndroid) {
        platform = "android";
      }

      String mode = "_unknown";
      if (kDebugMode) {
        mode = "debug";
      } else {
        mode = "release";
      }

      FirebaseAnalytics.instance.logCampaignDetails(
        source: "felix_test_source_${platform}_${mode}_v7",
        medium: "felix_test_medium_${platform}_${mode}_v7",
        campaign: "felix_test_campaign_${platform}_${mode}_v7",
      );
  1. Log some events via
FirebaseAnalytics.instance.logEvent(name: "eventName", parameters: {});
  1. Wait for Analytics reports (probably 1 day later)

Expected behavior

Event count should be correctly counted in each platform.

  • i.e.
    • "session source" of "test_source_ios_xxxx" should only be counted in Platform iOS
    • "session source" of "test_source_android_xxxx" should only be counted in Platform Android

But the actual result is all events are counted as "Android", as you can see in the diagram

  • row 1 - 8, "session source" is "test_source_ios_{mode}_v7", but they are counted in Android platform, which is incorrect
  • row 9, "session source" is "test_source_android_{mode}_v7", it is counted in Android platform, which is correct

Screenshot 2023-11-29 at 12 04 00 (2)

If the code "logCampaignDetails" is removed, the events are log in individual platform correctly
Screenshot 2023-11-29 at 12 15 07


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 [user-branch], 3.13.9, on macOS 13.5 22G74 darwin-arm64, locale en-GB)
    ! Flutter version 3.13.9 on channel [user-branch] at /Users/felix/Documents/flutter_sdk/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error.
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.84.2)
[✓] Connected device (4 available)
    ! Error: Browsing on the local area network for team的iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

! Doctor found issues in 1 category.

Flutter dependencies

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

Click To Expand
Dart SDK 3.1.5
Flutter SDK 3.13.9
my_app 1.0.0+1

dependencies:
- android_id 0.0.8 [flutter]
- app_links 3.4.5 [flutter plugin_platform_interface flutter_web_plugins]
- app_tracking_transparency 2.0.4 [flutter]
- appcenter_sdk_flutter 0.5.1 [flutter meta plugin_platform_interface]
- audio_session 0.1.16 [flutter flutter_web_plugins rxdart meta]
- auto_size_text 3.0.0 [flutter]
- badges 3.1.2 [flutter]
- bloc 8.1.2 [meta]
- build_runner 2.4.6 [analyzer args async 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]
- built_value_generator 8.7.0 [analyzer build build_config built_collection built_value collection source_gen]
- cached_network_image 3.3.0 [cached_network_image_platform_interface cached_network_image_web flutter flutter_cache_manager octo_image]
- carousel_slider 4.2.1 [flutter]
- collection 1.17.2
- connectivity_plus 3.0.6 [flutter flutter_web_plugins connectivity_plus_platform_interface js meta nm]
- convert 3.1.1 [typed_data]
- crypto 3.0.3 [typed_data]
- cupertino_icons 1.0.6
- cupertino_will_pop_scope 1.2.1 [flutter]
- dart_ping 9.0.1 [async collection]
- dart_ping_ios 4.0.2 [flutter dart_ping flutter_icmp_ping]
- device_info_plus 4.1.3 [flutter device_info_plus_platform_interface device_info_plus_macos device_info_plus_linux device_info_plus_web device_info_plus_windows]
- dio 4.0.6 [http_parser path]
- dotted_border 2.1.0 [flutter path_drawing]
- dotted_line 3.2.2 [flutter]
- encrypt 5.0.3 [args asn1lib clock collection crypto pointycastle]
- equatable 2.0.5 [collection meta]
- event_bus 2.0.0
- extended_nested_scroll_view 6.1.2 [flutter visibility_detector]
- facebook_app_events 0.17.1 [flutter]
- firebase_analytics 10.7.1 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter]
- firebase_auth 4.14.1 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 2.23.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 3.4.5 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- firebase_database 10.3.5 [firebase_core firebase_core_platform_interface firebase_database_platform_interface firebase_database_web flutter]
- firebase_dynamic_links 5.4.5 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface]
- firebase_messaging 14.7.5 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- firebase_performance 0.9.3+5 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter]
- firebase_remote_config 4.3.5 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math web sky_engine]
- flutter_beacon 0.5.1 [flutter]
- flutter_bloc 8.1.3 [bloc flutter provider]
- flutter_inappwebview 5.8.0 [flutter]
- flutter_local_notifications 15.1.2 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math web]
- flutter_mime 0.0.2 [flutter freezed_annotation json_serializable]
- flutter_sound 9.2.13 [path_provider recase uuid provider path synchronized logger flutter flutter_sound_platform_interface flutter_sound_web]
- flutter_svg 2.0.9 [flutter vector_graphics vector_graphics_codec vector_graphics_compiler]
- flutter_widget_from_html 0.10.6 [flutter flutter_widget_from_html_core fwfh_cached_network_image fwfh_chewie fwfh_just_audio fwfh_svg fwfh_url_launcher fwfh_webview html]
- google_api_availability 3.0.1 [flutter meta]
- google_maps_flutter 2.5.0 [flutter google_maps_flutter_android google_maps_flutter_ios google_maps_flutter_platform_interface google_maps_flutter_web]
- graphic 2.2.1 [collection flutter vector_math path_drawing]
- growingio_autotracker_flutter_plugin 1.1.3 [flutter plugin_platform_interface growingio_flutter_library]
- horizontal_data_table 4.3.1 [flutter provider]
- html 0.15.4 [csslib source_span]
- http 0.13.6 [async http_parser meta]
- image_gallery_saver 2.0.3 [flutter]
- image_picker 0.8.9 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_linux image_picker_macos image_picker_platform_interface image_picker_windows]
- in_app_review 2.0.8 [flutter in_app_review_platform_interface]
- intl 0.18.1 [clock meta path]
- just_audio 0.9.35 [just_audio_platform_interface just_audio_web audio_session rxdart path path_provider async uuid crypto meta flutter]
- lazy_data_table 0.3.1 [flutter]
- logger 1.4.0
- mime 1.0.4
- open_file_plus 3.4.1 [flutter ffi]
- overlay_support 2.1.0 [flutter async]
- package_info 2.0.2 [flutter]
- page_view_indicators 2.0.0 [flutter]
- path 1.8.3
- path_provider 2.1.1 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows]
- permission_handler 10.4.5 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface]
- photo_view 0.14.0 [flutter]
- pull_to_refresh 2.0.0 [flutter]
- reflectable 4.0.5 [analyzer build build_resolvers build_config build_runner build_runner_core dart_style glob logging package_config path source_span]
- ribbon_widget 1.0.5 [flutter]
- scrollable_positioned_list 0.3.5 [flutter collection]
- share_plus 6.3.4 [cross_file meta mime flutter flutter_web_plugins share_plus_platform_interface file url_launcher_web url_launcher_windows url_launcher_linux url_launcher_platform_interface ffi win32]
- shared_preferences 2.2.2 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- sprintf 7.0.0
- sticky_and_expandable_list 1.1.3 [flutter]
- timezone 0.9.2 [path]
- url_launcher 6.2.1 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- uuid 3.0.7 [crypto]
- visibility_detector 0.4.0+2 [flutter]
- webview_flutter 4.4.2 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview]
- whatsapp_stickers_exporter 1.0.0 [flutter plugin_platform_interface]
- youtube_player_flutter 8.1.2 [flutter flutter_inappwebview]

dev dependencies:
- flutter_driver 0.0.0 [file flutter flutter_test fuchsia_remote_debug_protocol path meta vm_service webdriver async boolean_selector characters clock collection matcher material_color_utilities platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api vector_math web]
- flutter_lints 3.0.1 [lints]
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math async boolean_selector characters collection material_color_utilities meta source_span stream_channel string_scanner term_glyph web]
- test 1.24.3 [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 matcher]

transitive dependencies:
- _fe_analyzer_shared 61.0.0 [meta]
- _flutterfire_internals 1.3.13 [collection firebase_core firebase_core_platform_interface flutter meta]
- analyzer 5.13.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- args 2.4.2
- asn1lib 1.5.0
- async 2.11.0 [collection meta]
- boolean_selector 2.1.1 [source_span string_scanner]
- build 2.4.1 [analyzer async convert crypto glob logging meta package_config path]
- build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml]
- build_daemon 4.0.0 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- build_resolvers 2.4.1 [analyzer async build collection convert crypto graphs logging package_config path pool pub_semver stream_transform yaml]
- build_runner_core 7.2.11 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta package_config path pool timing watcher yaml]
- built_collection 5.1.1
- built_value 8.7.0 [built_collection collection fixnum meta]
- cached_network_image_platform_interface 3.0.0 [flutter flutter_cache_manager]
- cached_network_image_web 1.1.0 [cached_network_image_platform_interface flutter flutter_cache_manager]
- characters 1.3.0
- checked_yaml 2.0.3 [json_annotation source_span yaml]
- chewie 1.5.0 [cupertino_icons flutter provider video_player wakelock]
- clock 1.1.1
- code_builder 4.7.0 [built_collection built_value collection matcher meta]
- connectivity_plus_platform_interface 1.2.4 [flutter meta plugin_platform_interface]
- coverage 1.6.3 [args logging package_config path source_maps stack_trace vm_service]
- cross_file 0.3.3+6 [js meta]
- csslib 1.0.0 [source_span]
- dart_style 2.3.2 [analyzer args path pub_semver source_span]
- dbus 0.7.8 [args ffi meta xml]
- device_info_plus_linux 3.0.0 [device_info_plus_platform_interface file flutter meta]
- device_info_plus_macos 3.0.0 [device_info_plus_platform_interface flutter]
- device_info_plus_platform_interface 3.0.0 [flutter meta plugin_platform_interface]
- device_info_plus_web 3.0.0 [device_info_plus_platform_interface flutter_web_plugins flutter]
- device_info_plus_windows 4.1.0 [device_info_plus_platform_interface ffi flutter win32]
- fake_async 1.3.1 [clock collection]
- ffi 2.1.0
- file 6.1.4 [meta path]
- file_selector_linux 0.9.2+1 [cross_file file_selector_platform_interface flutter]
- file_selector_macos 0.9.3+3 [cross_file file_selector_platform_interface flutter]
- file_selector_platform_interface 2.6.1 [cross_file flutter http plugin_platform_interface]
- file_selector_windows 0.9.3+1 [cross_file file_selector_platform_interface flutter]
- firebase_analytics_platform_interface 3.8.1 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_analytics_web 0.5.5+8 [_flutterfire_internals firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- firebase_auth_platform_interface 7.0.5 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 5.8.8 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser js meta]
- firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.8.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_crashlytics_platform_interface 3.6.13 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_database_platform_interface 0.2.5+13 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_database_web 0.2.3+13 [firebase_core firebase_core_web firebase_database_platform_interface flutter flutter_web_plugins js]
- firebase_dynamic_links_platform_interface 0.2.6+13 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_platform_interface 4.5.14 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_messaging_web 3.5.14 [_flutterfire_internals firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
- firebase_performance_platform_interface 0.1.4+13 [_flutterfire_internals firebase_core flutter plugin_platform_interface]
- firebase_performance_web 0.1.4+13 [_flutterfire_internals firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins js]
- firebase_remote_config_platform_interface 1.4.13 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_remote_config_web 1.4.13 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js]
- fixnum 1.1.0
- flutter_cache_manager 3.3.1 [clock collection file flutter http path path_provider rxdart sqflite uuid]
- flutter_icmp_ping 3.1.3 [async flutter]
- flutter_local_notifications_linux 4.0.0+1 [dbus ffi flutter flutter_local_notifications_platform_interface path xdg_directories]
- flutter_local_notifications_platform_interface 7.0.0+1 [flutter plugin_platform_interface]
- flutter_plugin_android_lifecycle 2.0.17 [flutter]
- flutter_sound_platform_interface 9.2.13 [flutter meta plugin_platform_interface logger]
- flutter_sound_web 9.2.13 [flutter_sound_platform_interface flutter logger flutter_web_plugins meta js]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math web]
- flutter_widget_from_html_core 0.10.6 [csslib flutter html]
- freezed_annotation 2.4.1 [collection json_annotation meta]
- frontend_server_client 3.2.0 [async path]
- fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform]
- fwfh_cached_network_image 0.7.0+7 [cached_network_image flutter flutter_cache_manager flutter_widget_from_html_core]
- fwfh_chewie 0.7.1+4 [chewie flutter flutter_widget_from_html_core video_player]
- fwfh_just_audio 0.9.0+3 [flutter flutter_widget_from_html_core just_audio]
- fwfh_svg 0.8.0+4 [flutter flutter_svg flutter_widget_from_html_core]
- fwfh_url_launcher 0.9.0+4 [flutter flutter_widget_from_html_core url_launcher]
- fwfh_webview 0.9.0+2 [flutter flutter_widget_from_html_core webview_flutter webview_flutter_android webview_flutter_wkwebview]
- glob 2.1.2 [async collection file path string_scanner]
- google_maps 6.3.0 [js js_wrapping meta]
- google_maps_flutter_android 2.5.3 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface stream_transform]
- google_maps_flutter_ios 2.3.2 [flutter google_maps_flutter_platform_interface stream_transform]
- google_maps_flutter_platform_interface 2.4.1 [collection flutter plugin_platform_interface stream_transform]
- google_maps_flutter_web 0.5.4+2 [collection flutter flutter_web_plugins google_maps google_maps_flutter_platform_interface sanitize_html stream_transform]
- graphs 2.3.1 [collection]
- growingio_flutter_library 1.0.1 [flutter collection plugin_platform_interface]
- http_multi_server 3.2.1 [async]
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- image_picker_android 0.8.8+2 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface]
- image_picker_for_web 2.2.0 [flutter flutter_web_plugins image_picker_platform_interface mime]
- image_picker_ios 0.8.8+4 [flutter image_picker_platform_interface]
- image_picker_linux 0.2.1+1 [file_selector_linux file_selector_platform_interface flutter image_picker_platform_interface]
- image_picker_macos 0.2.1+1 [file_selector_macos file_selector_platform_interface flutter image_picker_platform_interface]
- image_picker_platform_interface 2.9.1 [cross_file flutter http plugin_platform_interface]
- image_picker_windows 0.2.1+1 [file_selector_platform_interface file_selector_windows flutter image_picker_platform_interface]
- in_app_review_platform_interface 2.0.5 [flutter url_launcher plugin_platform_interface platform]
- io 1.0.4 [meta path string_scanner]
- js 0.6.7 [meta]
- js_wrapping 0.7.4 [js]
- json_annotation 4.8.1 [meta]
- json_serializable 6.7.1 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper]
- just_audio_platform_interface 4.2.1 [flutter plugin_platform_interface]
- just_audio_web 0.4.8 [just_audio_platform_interface flutter flutter_web_plugins]
- lints 3.0.0
- logging 1.2.0
- matcher 0.12.16 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.5.0 [collection]
- meta 1.9.1
- nested 1.0.0 [flutter]
- nm 0.5.0 [dbus]
- node_preamble 2.0.2
- octo_image 2.0.0 [flutter]
- package_config 2.1.0 [path]
- path_drawing 1.0.1 [vector_math meta path_parsing flutter]
- path_parsing 1.0.1 [vector_math meta]
- path_provider_android 2.2.1 [flutter path_provider_platform_interface]
- path_provider_foundation 2.3.1 [flutter path_provider_platform_interface]
- path_provider_linux 2.2.1 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_platform_interface 2.1.1 [flutter platform plugin_platform_interface]
- path_provider_windows 2.2.1 [ffi flutter path path_provider_platform_interface win32]
- permission_handler_android 10.3.6 [flutter permission_handler_platform_interface]
- permission_handler_apple 9.1.4 [flutter permission_handler_platform_interface]
- permission_handler_platform_interface 3.12.0 [flutter meta plugin_platform_interface]
- permission_handler_windows 0.1.3 [flutter permission_handler_platform_interface]
- petitparser 5.4.0 [meta]
- platform 3.1.0
- plugin_platform_interface 2.1.6 [meta]
- pointycastle 3.7.3 [collection convert js]
- pool 1.5.1 [async stack_trace]
- process 4.2.4 [file path platform]
- provider 6.0.5 [collection flutter nested]
- pub_semver 2.1.4 [collection meta]
- pubspec_parse 1.2.3 [checked_yaml collection json_annotation pub_semver yaml]
- recase 4.1.0
- rxdart 0.27.7
- sanitize_html 2.1.0 [html meta]
- share_plus_platform_interface 3.3.1 [cross_file flutter meta mime plugin_platform_interface path_provider uuid]
- shared_preferences_android 2.2.1 [flutter shared_preferences_platform_interface]
- shared_preferences_foundation 2.3.4 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.3.2 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.3.1 [flutter plugin_platform_interface]
- shared_preferences_web 2.2.1 [flutter flutter_web_plugins shared_preferences_platform_interface]
- shared_preferences_windows 2.3.2 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- shelf 1.4.1 [async collection http_parser path stack_trace stream_channel]
- shelf_packages_handler 3.0.2 [path shelf shelf_static]
- shelf_static 1.1.2 [convert http_parser mime path shelf]
- shelf_web_socket 1.0.4 [shelf stream_channel web_socket_channel]
- sky_engine 0.0.99
- source_gen 1.4.0 [analyzer async build dart_style glob path source_span yaml]
- source_helper 1.3.4 [analyzer collection source_gen]
- source_map_stack_trace 2.1.1 [path source_maps stack_trace]
- source_maps 0.10.12 [source_span]
- source_span 1.10.0 [collection path term_glyph]
- sqflite 2.3.0 [flutter sqflite_common path]
- sqflite_common 2.5.0+1 [synchronized path meta]
- stack_trace 1.11.0 [path]
- stream_channel 2.1.1 [async]
- stream_transform 2.1.0
- string_scanner 1.2.0 [source_span]
- sync_http 0.3.1
- synchronized 3.1.0
- term_glyph 1.2.1
- test_api 0.6.0 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- test_core 0.5.3 [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 test_api]
- timing 1.0.1 [json_annotation]
- typed_data 1.3.2 [collection]
- url_launcher_android 6.2.0 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.2.0 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.1.0 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.1.0 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.2.0 [flutter plugin_platform_interface]
- url_launcher_web 2.2.0 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.1.0 [flutter url_launcher_platform_interface]
- vector_graphics 1.1.9+1 [flutter vector_graphics_codec]
- vector_graphics_codec 1.1.9+1
- vector_graphics_compiler 1.1.9+1 [args meta path_parsing xml vector_graphics_codec path]
- vector_math 2.1.4
- video_player 2.8.1 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web]
- video_player_android 2.4.10 [flutter video_player_platform_interface]
- video_player_avfoundation 2.5.1 [flutter video_player_platform_interface]
- video_player_platform_interface 6.2.1 [flutter plugin_platform_interface]
- video_player_web 2.1.2 [flutter flutter_web_plugins video_player_platform_interface]
- vm_service 11.7.1
- wakelock 0.6.2 [flutter meta wakelock_macos wakelock_platform_interface wakelock_web wakelock_windows]
- wakelock_macos 0.4.0 [flutter flutter_web_plugins wakelock_platform_interface]
- wakelock_platform_interface 0.3.0 [flutter meta]
- wakelock_web 0.4.0 [flutter flutter_web_plugins js wakelock_platform_interface]
- wakelock_windows 0.2.1 [flutter wakelock_platform_interface win32]
- watcher 1.1.0 [async path]
- web 0.1.4-beta
- web_socket_channel 2.4.0 [async crypto stream_channel]
- webdriver 3.0.2 [matcher path stack_trace sync_http]
- webkit_inspection_protocol 1.2.1 [logging]
- webview_flutter_android 3.12.1 [flutter webview_flutter_platform_interface]
- webview_flutter_platform_interface 2.6.0 [flutter meta plugin_platform_interface]
- webview_flutter_wkwebview 3.9.3 [flutter path webview_flutter_platform_interface]
- win32 3.1.4 [ffi]
- xdg_directories 1.0.3 [meta path]
- xml 6.3.0 [collection meta petitparser]
- yaml 3.1.2 [collection source_span string_scanner]

@felixkwok2 felixkwok2 added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Nov 29, 2023
@darshankawar darshankawar added the triage Issue is currently being triaged. label Nov 29, 2023
@darshankawar
Copy link

Thanks for the report @felixkwok2
There's a similar open issue describing your case, #10107, so please follow-up in it for further updates.
Closing this as a duplicate.

@darshankawar darshankawar closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2023
@darshankawar darshankawar added resolution: duplicate This issue or pull request already exists and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Nov 29, 2023
@felixkwok2
Copy link
Author

Thanks for your reply. @darshankawar
I have read #10107 before asking this question.

Although we are both talking about logCampaignDetails, I think the cases are quite different.

  • #10107 is about "source, medium, campaign and utm parameters are most probably not being sent to GA"
  • the issue I encountered is the iOS events being counted into Android Platform (causing all the event incorrectly logged which is more serious), not related to parameters being sent to GA or not
    • In addition, currently utm parameters are sent to GA, so I think the issue in #10107 is fixed.
@darshankawar
Copy link

Thanks for the feedback. Reopening.

@darshankawar darshankawar reopened this Nov 30, 2023
@darshankawar darshankawar added triage Issue is currently being triaged. and removed resolution: duplicate This issue or pull request already exists labels Nov 30, 2023
@darshankawar
Copy link

3. Wait for Analytics reports (probably 1 day later)

I've set it and will come back to it tomorrow to check I get same results as you reported or not.
Meantime, does debugView also give same result ?

@darshankawar darshankawar added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Nov 30, 2023
@felixkwok2
Copy link
Author

felixkwok2 commented Dec 1, 2023

  1. Wait for Analytics reports (probably 1 day later)

I've set it and will come back to it tomorrow to check I get same results as you reported or not. Meantime, does debugView also give same result ?

Thanks for your reply.

In DebugView,

  • event "campaign_details" generated by calling "logCampaignDetails()" is not visible
  • For the events after calling "logCampaignDetails()", "utm_parameter" (source, medium) are not visible.
  • "Platform" seems not visible in debugView, but I can see that the "debug device" is "Apple iPhone 9, 1" (iPhone 7)

In Flutter log,

  • it did log the "campaign_details" from "logCampaignDetails()"
10.18.0 - [FirebaseAnalytics][I-ACS023051] Logging event: origin, name, params: app, campaign_details, {
    campaign = felix_test_campaign_ios_debug_v7;
    ga_event_origin (_o) = app;
    ga_screen (_sn) = Home View;
    ga_screen_class (_sc) = HomePage;
    ga_screen_id (_si) = -3348151285656576997;
    medium = felix_test_medium_ios_debug_v7;
    source = felix_test_source_ios_debug_v7;
}
  • For the events after calling "logCampaignDetails()", "utm_parameter" (source, medium) are not visible.
    • Analytics report is able to show the "session source" and "session medium"
10.18.0 - [FirebaseAnalytics][I-ACS023051] Logging event: origin, name, params: app, myEvent, {
    Action = ;
    ActionFrom = home_testing_button;
    Category = home_testing_button;
    CustomName = home_testing_button;
    ga_event_origin (_o) = app;
    ga_screen (_sn) = Home View;
    ga_screen_class (_sc) = HomePage;
    ga_screen_id (_si) = -3348151285656576997;
    IsFlutter = 1;
    Label = testing;
}

Thank you.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Dec 1, 2023
@darshankawar
Copy link

Thanks for the updates. In Flutter log, I do see the iOS events as being captured correctly similar to what you shared above:

  • it did log the "campaign_details" from "logCampaignDetails()"

In the analytics dashboard though, they are being logged as Android itself than iOS. Based on these outcomes, I am not totally sure if this is a plugin issue or something at the firebase dashboard itself, but based on the report, I'll keep this issue open for team's input.

@darshankawar darshankawar added plugin: analytics and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Dec 1, 2023
@felixkwok2
Copy link
Author

Thanks for the updates. In Flutter log, I do see the iOS events as being captured correctly similar to what you shared above:

  • it did log the "campaign_details" from "logCampaignDetails()"

In the analytics dashboard though, they are being logged as Android itself than iOS. Based on these outcomes, I am not totally sure if this is a plugin issue or something at the firebase dashboard itself, but based on the report, I'll keep this issue open for team's input.

Thanks for your testing and reply.

@felixkwok2
Copy link
Author

@darshankawar

In addition, I would like to know if I am using this function correctly.

We are trying log the utm parameters when user click on our link to open the app (eg: www.ourcompany.com?utm_campaign=c&utm_source=s&utm_medium=m)

When the app is launched by clicking the link, we extract the utm parameters and call the function "logCampaignDetails()".

Is it a correct way to log the utm parameters in analytics?
(Because we are migrating from native app to flutter, and do not need to call extra functions in native app)

Thank you.

@felixkwok2
Copy link
Author

felixkwok2 commented Dec 22, 2023

@darshankawar

I just found a user with same issue. #8456

BTW,
I would like to know is there any alternative instead of calling "logCampaignDetails()" to log the utm parameters?

or any other parties I should reported to about this issue?

Thank you so much.

@Lyokone Lyokone added the platform: all Issues / PRs which are for all platforms. label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: all Issues / PRs which are for all platforms. plugin: analytics type: bug Something isn't working
4 participants