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.6k stars 3.95k forks source link

🐛 [firebase_dynamic_links] Discrepancy in the tracked analytics data #9659

Closed mkm279 closed 1 year ago

mkm279 commented 1 year ago

Bug report

Describe the bug Let me start by saying that I am not sure if this is the right place to report this bug or not, so any help in the right direction will be greatly appreciated.

The issue we are facing is that session data that is tracked from the dynamic link and shown on the firebase console is not matching with data received from the dynamic link callback.

This is the screenshot of APP_OPEN events where the source is wondermart_app, which I have set in my dynamic link. Count = 4.2K

Screenshot 2022-10-03 at 1 30 21 PM

Dynamic link details:

Screenshot 2022-10-03 at 1 30 59 PM

You will notice that I have explicitly set both social tracking params and query params as there are issues with retrieving this data too consistently as reported here

I am retrieving this data like this and passing it to Mixpanel as part of all events

Screenshot 2022-10-03 at 1 32 16 PM

Now the Mixpanel data for the same date range and specified app versions is way low:

Screenshot 2022-10-03 at 1 33 53 PM

wondermart_app (comes when utmParams are received properly) + [wondermart_app] (comes as a fallback from query params) = 17 This is way less than the reported count on the Firebase console(4.2K)

Steps to reproduce

Steps to reproduce the behaviour:

Unfortunately, I am not sure how to reproduce this. In a minimal example, I am able to retrieve the utm_params and pass it to Mixpanel properly with my code above. But the data is very different when released to a wider audience on production.

Expected behavior

Session source/campaign/medium count should match.

Sample project


Additional context

Add any other context about the problem here.


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.2, on macOS 11.3 20E232 darwin-x64, locale en-GB) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1) [✓] Chrome - develop for the web [✓] Android Studio (version 4.2) [✓] IntelliJ IDEA Ultimate Edition (version 2021.1.1) [✓] VS Code (version 1.69.2) [✓] Connected device (2 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.1 Flutter SDK 3.3.2 wondermart_app 1.0.84+84 dependencies: - advertising_id 2.3.0 [flutter] - android_id 0.0.7 [flutter] - android_play_install_referrer 0.2.1 [flutter] - app_settings 4.1.8 [flutter] - app_tracking_transparency 2.0.2+4 [flutter] - appsflyer_sdk 6.8.2 [flutter] - auto_size_text 3.0.0 [flutter] - badges 2.0.3 [flutter] - cached_network_image 3.2.1 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web] - carousel_slider 4.1.1 [flutter] - carrier_info 2.0.5 [flutter] - connectivity_plus 2.3.6+1 [flutter connectivity_plus_platform_interface connectivity_plus_linux connectivity_plus_macos connectivity_plus_web connectivity_plus_windows] - crypto 3.0.2 [typed_data] - cupertino_icons 1.0.5 - device_info_plus 4.1.2 [flutter device_info_plus_platform_interface device_info_plus_macos device_info_plus_linux device_info_plus_web device_info_plus_windows] - dotted_line 3.1.0 [flutter] - file_picker 5.0.1 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path win32] - firebase_analytics 9.3.3 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_core 1.21.1 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 2.8.9 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_dynamic_links 4.3.6 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_messaging 13.0.2 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_performance 0.8.2+4 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter] - flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine] - flutter_countdown_timer 4.1.0 [flutter] - flutter_jailbreak_detection 1.8.0 [flutter] - flutter_launcher_icons 0.10.0 [args checked_yaml cli_util image json_annotation path yaml] - flutter_share_me 1.3.0 [flutter lint] - freezed_annotation 2.1.0 [collection json_annotation meta] - geolocator 9.0.1 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows] - get_storage 2.0.3 [flutter get path_provider] - go_router 3.1.1 [collection flutter flutter_web_plugins logging meta] - google_fonts 3.0.1 [flutter http path_provider crypto] - google_maps_flutter 2.1.12 [flutter google_maps_flutter_android google_maps_flutter_ios google_maps_flutter_platform_interface] - http 0.13.5 [async http_parser meta path] - image_picker 0.8.5+3 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface] - implicitly_animated_list 2.1.0 [flutter list_diff] - in_app_review 2.0.4 [flutter in_app_review_platform_interface] - in_app_update 3.0.0 [flutter] - intl 0.17.0 [clock path] - json_annotation 4.6.0 [meta] - lottie 1.4.2 [archive flutter path vector_math] - lzstring 2.0.0+2 [typed_data] - mixpanel_flutter 2.0.0 [flutter flutter_web_plugins js] - mockito 5.3.0 [analyzer build code_builder collection dart_style matcher meta path source_gen test_api] - moengage_flutter 4.2.0 [flutter] - network_info_plus 2.1.4+1 [flutter meta network_info_plus_platform_interface network_info_plus_linux network_info_plus_macos network_info_plus_windows network_info_plus_web] - package_info_plus 1.4.3+1 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web] - path 1.8.2 - path_provider 2.0.11 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows] - pinput 2.2.12 [flutter smart_auth] - provider 6.0.3 [collection flutter nested] - razorpay_flutter 1.3.2 [flutter eventify fluttertoast package_info_plus] - share_plus 4.0.10+1 [meta mime flutter share_plus_platform_interface share_plus_linux share_plus_macos share_plus_windows share_plus_web] - shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows] - shimmer 2.0.0 [flutter] - social_share 2.2.1 [flutter path_provider] - sqflite 2.0.3+1 [flutter sqflite_common path] - synchronized 3.0.0+2 - uni_links 0.5.1 [flutter uni_links_platform_interface uni_links_web] - url_launcher 6.1.5 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows] - visibility_detector 0.3.3 [flutter] - webview_flutter 3.0.4 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview] dev dependencies: - build_runner 2.2.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] - 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] - freezed 2.1.0+1 [analyzer build build_config collection meta source_gen freezed_annotation json_annotation] - integration_test 0.0.0 [flutter flutter_driver flutter_test path vm_service archive async boolean_selector characters clock collection crypto fake_async file matcher material_color_utilities meta source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math webdriver] - json_serializable 6.3.1 [analyzer async build build_config collection json_annotation meta path pub_semver pubspec_parse source_gen source_helper] - network_image_mock 2.1.1 [flutter mockito] - 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] transitive dependencies: - _fe_analyzer_shared 46.0.0 [meta] - analyzer 4.6.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml] - archive 3.3.0 [crypto path] - args 2.3.1 - async 2.9.0 [collection meta] - boolean_selector 2.1.0 [source_span string_scanner] - build 2.3.0 [analyzer async convert crypto glob logging meta path] - build_config 1.1.0 [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.9 [analyzer async build crypto graphs logging path package_config pool pub_semver stream_transform yaml] - build_runner_core 7.2.3 [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.1 [built_collection collection fixnum meta] - cached_network_image_platform_interface 1.0.0 [flutter flutter_cache_manager] - cached_network_image_web 1.0.1 [flutter flutter_cache_manager cached_network_image_platform_interface] - characters 1.2.1 - checked_yaml 2.0.1 [json_annotation source_span yaml] - cli_util 0.3.5 [meta path] - clock 1.1.1 - code_builder 4.2.0 [built_collection built_value collection matcher meta] - collection 1.16.0 - connectivity_plus_linux 1.3.1 [flutter connectivity_plus_platform_interface meta nm] - connectivity_plus_macos 1.2.4 [connectivity_plus_platform_interface flutter] - connectivity_plus_platform_interface 1.2.1 [flutter meta plugin_platform_interface] - connectivity_plus_web 1.2.3 [connectivity_plus_platform_interface flutter_web_plugins flutter] - connectivity_plus_windows 1.2.2 [connectivity_plus_platform_interface flutter] - convert 3.0.2 [typed_data] - coverage 1.5.0 [args logging package_config path source_maps stack_trace vm_service] - cross_file 0.3.3+1 [js meta] - dart_style 2.2.3 [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.0.0 [device_info_plus_platform_interface ffi flutter win32] - eventify 1.0.1 - fake_async 1.3.1 [clock collection] - ffi 2.0.1 - file 6.1.2 [meta path] - firebase 9.0.3 [http http_parser js] - firebase_analytics_platform_interface 3.3.3 [firebase_core flutter meta plugin_platform_interface] - firebase_analytics_web 0.4.2+3 [firebase_analytics_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js] - firebase_core_platform_interface 4.5.1 [collection flutter flutter_test meta plugin_platform_interface] - firebase_core_web 1.7.2 [firebase_core_platform_interface flutter flutter_web_plugins js meta] - firebase_crashlytics_platform_interface 3.2.15 [collection firebase_core flutter meta plugin_platform_interface] - firebase_dynamic_links_platform_interface 0.2.3+11 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_platform_interface 4.1.4 [firebase_core flutter meta plugin_platform_interface] - firebase_messaging_web 3.1.4 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta] - firebase_performance_platform_interface 0.1.1+15 [firebase_core flutter plugin_platform_interface] - firebase_performance_web 0.1.1+4 [firebase firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins js] - fixnum 1.0.1 - flutter_blurhash 0.7.0 [flutter] - flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid] - flutter_driver 0.0.0 [file flutter flutter_test fuchsia_remote_debug_protocol path meta vm_service webdriver archive async boolean_selector characters clock collection crypto matcher material_color_utilities platform process source_span stack_trace stream_channel string_scanner sync_http term_glyph test_api typed_data vector_math] - flutter_plugin_android_lifecycle 2.0.7 [flutter] - flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math] - fluttertoast 8.0.9 [flutter flutter_web_plugins] - frontend_server_client 2.1.3 [async path] - fuchsia_remote_debug_protocol 0.0.0 [process vm_service file meta path platform] - geolocator_android 4.1.2 [flutter geolocator_platform_interface] - geolocator_apple 2.2.1 [flutter geolocator_platform_interface] - geolocator_platform_interface 4.0.6 [flutter plugin_platform_interface vector_math meta] - geolocator_web 2.1.6 [flutter flutter_web_plugins geolocator_platform_interface] - geolocator_windows 0.1.1 [flutter geolocator_platform_interface] - get 4.6.5 [flutter] - glob 2.1.0 [async collection file path string_scanner] - google_maps_flutter_android 2.2.0 [flutter flutter_plugin_android_lifecycle google_maps_flutter_platform_interface stream_transform] - google_maps_flutter_ios 2.1.11 [flutter google_maps_flutter_platform_interface stream_transform] - google_maps_flutter_platform_interface 2.2.2 [collection flutter plugin_platform_interface stream_transform] - graphs 2.1.0 [collection] - http_multi_server 3.2.1 [async] - http_parser 4.0.1 [collection source_span string_scanner typed_data] - image 3.2.0 [archive meta xml] - image_picker_android 0.8.5+2 [flutter flutter_plugin_android_lifecycle image_picker_platform_interface] - image_picker_for_web 2.1.8 [flutter flutter_web_plugins image_picker_platform_interface] - image_picker_ios 0.8.5+6 [flutter image_picker_platform_interface] - image_picker_platform_interface 2.6.1 [cross_file flutter http plugin_platform_interface] - in_app_review_platform_interface 2.0.3 [flutter url_launcher plugin_platform_interface platform] - io 1.0.3 [meta path string_scanner] - js 0.6.4 - lint 1.10.0 - lints 2.0.0 - list_diff 2.0.1 [async] - logging 1.0.2 - matcher 0.12.12 [stack_trace] - material_color_utilities 0.1.5 - meta 1.8.0 - mime 1.0.2 - nested 1.0.0 [flutter] - network_info_plus_linux 1.1.2 [collection flutter meta network_info_plus_platform_interface nm] - network_info_plus_macos 1.3.0 [network_info_plus_platform_interface flutter] - network_info_plus_platform_interface 1.1.2 [flutter meta plugin_platform_interface] - network_info_plus_web 1.0.1 [flutter flutter_web_plugins network_info_plus_platform_interface] - network_info_plus_windows 1.0.2 [flutter network_info_plus_platform_interface] - nm 0.5.0 [dbus] - node_preamble 2.0.1 - octo_image 1.0.2 [flutter flutter_blurhash] - package_config 2.1.0 [path] - package_info_plus_linux 1.0.5 [package_info_plus_platform_interface flutter path] - package_info_plus_macos 1.3.0 [flutter] - package_info_plus_platform_interface 1.0.2 [flutter meta plugin_platform_interface] - package_info_plus_web 1.0.5 [flutter flutter_web_plugins http meta package_info_plus_platform_interface] - package_info_plus_windows 2.0.0 [package_info_plus_platform_interface ffi flutter win32] - path_provider_android 2.0.20 [flutter path_provider_platform_interface] - path_provider_ios 2.0.11 [flutter path_provider_platform_interface] - path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories] - path_provider_macos 2.0.6 [flutter path_provider_platform_interface] - path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface] - path_provider_windows 2.1.2 [ffi flutter path path_provider_platform_interface win32] - pedantic 1.11.1 - petitparser 5.0.0 [meta] - platform 3.1.0 - plugin_platform_interface 2.1.2 [meta] - pool 1.5.1 [async stack_trace] - process 4.2.4 [file path platform] - pub_semver 2.1.1 [collection meta] - pubspec_parse 1.2.1 [checked_yaml collection json_annotation pub_semver yaml] - rxdart 0.27.5 - share_plus_linux 3.0.0 [share_plus_platform_interface file flutter meta url_launcher] - share_plus_macos 3.0.1 [share_plus_platform_interface flutter] - share_plus_platform_interface 3.0.3 [flutter meta mime plugin_platform_interface] - share_plus_web 3.0.1 [share_plus_platform_interface url_launcher flutter flutter_web_plugins meta] - share_plus_windows 3.0.1 [share_plus_platform_interface flutter meta url_launcher] - shared_preferences_android 2.0.12 [flutter shared_preferences_platform_interface] - shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface] - shared_preferences_linux 2.1.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface] - shared_preferences_macos 2.0.4 [flutter shared_preferences_platform_interface] - shared_preferences_platform_interface 2.1.0 [flutter plugin_platform_interface] - shared_preferences_web 2.0.4 [flutter flutter_web_plugins shared_preferences_platform_interface] - shared_preferences_windows 2.1.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface] - shelf 1.3.2 [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.2 [shelf stream_channel web_socket_channel] - sky_engine 0.0.99 - smart_auth 1.0.5 [flutter flutter_web_plugins] - source_gen 1.2.2 [analyzer async build dart_style glob meta path source_span yaml] - source_helper 1.3.2 [analyzer collection source_gen] - source_map_stack_trace 2.1.0 [path stack_trace source_maps] - source_maps 0.10.10 [source_span] - source_span 1.9.0 [collection path term_glyph] - sqflite_common 2.2.1+1 [synchronized path meta] - stack_trace 1.10.0 [path] - stream_channel 2.1.0 [async] - stream_transform 2.0.0 - string_scanner 1.1.1 [source_span] - sync_http 0.3.1 - term_glyph 1.2.1 - 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] - uni_links_platform_interface 1.0.0 [flutter plugin_platform_interface] - uni_links_web 0.1.0 [flutter flutter_web_plugins uni_links_platform_interface] - url_launcher_android 6.0.17 [flutter url_launcher_platform_interface] - url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface] - url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface] - url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface] - url_launcher_platform_interface 2.1.0 [flutter plugin_platform_interface] - url_launcher_web 2.0.13 [flutter flutter_web_plugins url_launcher_platform_interface] - url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface] - uuid 3.0.6 [crypto] - vector_math 2.1.2 - vm_service 9.0.0 - watcher 1.0.1 [async path] - web_socket_channel 2.2.0 [async crypto stream_channel] - webdriver 3.0.0 [archive matcher path stack_trace sync_http] - webkit_inspection_protocol 1.1.0 [logging] - webview_flutter_android 2.9.5 [flutter webview_flutter_platform_interface] - webview_flutter_platform_interface 1.9.2 [flutter meta plugin_platform_interface] - webview_flutter_wkwebview 2.9.3 [flutter path webview_flutter_platform_interface] - win32 2.7.0 [ffi] - xdg_directories 0.2.0+2 [meta path process] - xml 6.1.0 [collection meta petitparser] - yaml 3.1.1 [collection source_span string_scanner] ```

darshankawar commented 1 year ago

@mkm279 Thanks for the report but I am not sure if this will be actionable from client side, because Flutterfire plugins are just wrappers around native Firebase sdks and send, receive data through Dart. Per you comment, that you are unable to replicate with a minimal code sample, I suggest you to reach out to Firebase support for further resolution. Closing for now. If you disagree or get directed here, write in comments and I'll consider to reopen for further analysis.