-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[FDC Metrics] Move the app detection into 4 counter labels #9318
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
base: master
Are you sure you want to change the base?
Conversation
…nd the number of apps for each platform (web, android, ios, flutter) as separate parameters in the `trackGA4` call. I modified `src/init/features/dataconnect/index.ts` to include granular app counts (`num_web_apps`, `num_android_apps`, etc.) in the `trackGA4` call for the `dataconnect_init` event. I have verified the changes in both `src/init/features/dataconnect/sdk.ts` and `src/init/features/dataconnect/index.ts`. The new analytics parameters are correctly implemented.
Summary of ChangesHello @fredzqm, 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 enhances the analytics data collected during the Data Connect initialization process. It shifts the method of reporting app platform usage from a consolidated string within the Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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 refactors the Google Analytics tracking for Data Connect initialization by replacing a single flow
string with more granular counters for each application platform. The changes are implemented correctly in both src/init/features/dataconnect/index.ts
and src/init/features/dataconnect/sdk.ts
. My review focuses on improving maintainability by addressing code duplication and the use of hardcoded strings.
/gemini review |
flow
label to 4 countersThere was a problem hiding this 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 refactors the analytics tracking for Data Connect initialization by replacing a complex flow
string with individual counters for each application platform. This is a positive change that improves the clarity and parsability of the collected analytics data. The implementation is sound and correctly achieves the stated goal. I have included one suggestion to refactor the new initAppCounters
function for improved readability and type safety.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors Firebase Data Connect analytics to use counter labels for app detection instead of flow strings, making metrics more parseable in Google Analytics. The change simplifies how app platform data is tracked by converting from flow-based strings to discrete counter fields.
Key changes:
- Replace flow-based app tracking with individual counter labels (num_web_apps, num_android_apps, etc.)
- Add proper duration tracking for analytics events
- Handle absent firebase-data-connect labels with "absent" default value
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/init/features/dataconnect/sdk.ts | Adds initAppCounters() function and refactors analytics tracking to use counters instead of flow strings |
src/init/features/dataconnect/index.ts | Updates main dataconnect init to use new counter-based analytics and include duration |
src/dataconnect/provisionCloudSql.ts | Sets default "absent" value for missing firebase-data-connect labels |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@rosalyntan Got another small metrics PR~ |
We were getting some hard to parse
flow
in GA. Let's collapse them into counters~Besides this, a few minor fix:
firebase-data-connect
label is absentdataconnect_init
.Description
Scenarios Tested
Sample Commands