Skip to content

Conversation

john-mikhail
Copy link

Description

Provide details of the change, and generalize the change in the PR title above.

Updated the analytics dll to the latest version and added an implementation of NotifyAppLifecycleChange,


Testing

Describe how you've tested these changes. Link any manually triggered Integration tests or CPP binary SDK Packaging Github Action workflows, if applicable.

Built and ran the analytics/integration_test.exe with all tests passing:

[==========] Running 11 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 11 tests from FirebaseAnalyticsTest
[ RUN      ] FirebaseAnalyticsTest.TestSetCollectionEnabled
[       OK ] FirebaseAnalyticsTest.TestSetCollectionEnabled (0 ms)
[ RUN      ] FirebaseAnalyticsTest.TestSetSessionTimeoutDuraction
[       OK ] FirebaseAnalyticsTest.TestSetSessionTimeoutDuraction (0 ms)
[ RUN      ] FirebaseAnalyticsTest.TestGetAnalyticsInstanceID
DEBUG: WaitForCompletion GetAnalyticsInstanceId
[       OK ] FirebaseAnalyticsTest.TestGetAnalyticsInstanceID (0 ms)
[ RUN      ] FirebaseAnalyticsTest.TestGetSessionID
DEBUG: WaitForCompletion GetSessionId
INFO: Got session ID: 26552175406438155
[       OK ] FirebaseAnalyticsTest.TestGetSessionID (1009 ms)
[ RUN      ] FirebaseAnalyticsTest.TestResettingGivesNewInstanceId
DEBUG: WaitForCompletion GetAnalyticsInstanceId
DEBUG: WaitForCompletion GetAnalyticsInstanceId after ResetAnalyticsData
[       OK ] FirebaseAnalyticsTest.TestResettingGivesNewInstanceId (0 ms)
[ RUN      ] FirebaseAnalyticsTest.TestSetProperties
[       OK ] FirebaseAnalyticsTest.TestSetProperties (0 ms)
[ RUN      ] FirebaseAnalyticsTest.TestLogEvents
[       OK ] FirebaseAnalyticsTest.TestLogEvents (0 ms)
[ RUN      ] FirebaseAnalyticsTest.TestNotifyAppLifecycleChange
[       OK ] FirebaseAnalyticsTest.TestNotifyAppLifecycleChange (0 ms)
[ RUN      ] FirebaseAnalyticsTest.TestLogEventWithMultipleParameters
[       OK ] FirebaseAnalyticsTest.TestLogEventWithMultipleParameters (0 ms)
[ RUN      ] FirebaseAnalyticsTest.TestLogEventWithComplexParameters
[       OK ] FirebaseAnalyticsTest.TestLogEventWithComplexParameters (0 ms)
[ RUN      ] FirebaseAnalyticsTest.TestSetConsent
[       OK ] FirebaseAnalyticsTest.TestSetConsent (3024 ms)
[----------] 11 tests from FirebaseAnalyticsTest (4058 ms total)

[----------] Global test environment tear-down
[==========] 11 tests from 1 test suite ran. (9116 ms total)
[  PASSED  ] 11 tests.

Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

…for latest changes.

Add latest google_analytics.dll and corresponding public header files.  Also added the implementations for SetLogCallback and NotifyAppLifecycleChange.
Add missing header file.
Added integration test and removed the ability to set logging callback for now.  Will add in the future.
Copy link

Summary of Changes

Hello @john-mikhail, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on updating the Windows Analytics DLL to its latest version, which includes a new naming convention for the DLL. A significant new feature is the introduction of an NotifyAppLifecycleChange API, allowing the application to explicitly inform the Analytics SDK about its lifecycle state, crucial for ensuring data is properly uploaded before termination. Additionally, the update provides a mechanism for setting a custom log callback, enhancing debuggability and integration, and introduces an option to specify a custom data storage directory.

Highlights

  • Analytics DLL Update: The Windows Analytics DLL has been updated to its latest version, which includes a new filename and an updated SHA256 hash for verification.
  • App Lifecycle Management: A new NotifyAppLifecycleChange function has been introduced, allowing the SDK to be explicitly informed about the application's lifecycle state, particularly for termination events to ensure pending data is uploaded.
  • Logging Callback: Functionality to set a custom log callback has been added, enabling applications to intercept and handle SDK log messages for better debuggability and integration.
  • DLL Naming Standardization: The analytics DLL filename has been standardized from analytics_win.dll to google_analytics.dll across the codebase for consistency.
  • Improved API Return Types: Several Insert functions in the C API now return a bool to indicate success or failure, improving error handling capabilities.
  • Configurable Data Directory: The GoogleAnalytics_Options now includes an app_data_directory field, allowing users to specify a custom path for SDK data storage.
  • New Event and Event Parameter Updates: A new event kEventPublicInAppPurchase has been added, and the parameter requirements for kEventScreenView have been updated, making kParameterScreenClass optional.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the analytics Windows DLL to its latest version, which introduces several API changes. A new function, NotifyAppLifecycleChange, has been added to handle app lifecycle events, and this is now correctly called during termination to ensure analytics data is flushed. The codebase has been updated to reflect other API changes, such as modified function signatures and new initialization options. The integration tests have also been updated to cover the new functionality. My review includes a couple of minor suggestions to improve documentation and code readability.

Fix typo

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@john-mikhail john-mikhail added the tests-requested: quick Trigger a quick set of integration tests. label Sep 30, 2025
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. and removed tests-requested: quick Trigger a quick set of integration tests. labels Sep 30, 2025
Copy link

github-actions bot commented Sep 30, 2025

❌  Integration test FAILED

Requested by @john-mikhail on commit de68294
Last updated: Tue Sep 30 17:38 PDT 2025
View integration test log & download artifacts

Failures Configs
missing_log [TEST] [ERROR] [iOS] [macos] [1/2 ios_device: simulator_target]
[TEST] [ERROR] [tvOS] [macos] [tvos_simulator]
analytics [BUILD] [ERROR] [Android] [All 3 os]
[BUILD] [ERROR] [iOS] [macos]
[BUILD] [ERROR] [tvOS] [macos]

Add flaky tests to go/fpl-cpp-flake-tracker

@github-actions github-actions bot added the tests: failed This PR's integration tests failed. label Sep 30, 2025
@john-mikhail john-mikhail added skip-release-notes Skip release notes check tests-requested: quick Trigger a quick set of integration tests. and removed tests: in-progress This PR's integration tests are in progress. tests: failed This PR's integration tests failed. labels Sep 30, 2025
@github-actions github-actions bot added tests: in-progress This PR's integration tests are in progress. tests: failed This PR's integration tests failed. and removed tests-requested: quick Trigger a quick set of integration tests. labels Sep 30, 2025
@firebase-workflow-trigger firebase-workflow-trigger bot removed the tests: in-progress This PR's integration tests are in progress. label Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-release-notes Skip release notes check tests: failed This PR's integration tests failed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant