Repository navigation
Count Windows and Linux users in analytics, and report the real version - #45
Merged
Merged
Conversation
The Firebase SDK has no Windows/Linux implementation, so those installs were never counted. AnalyticsService now sends through an AnalyticsBackend: the Firebase SDK where it exists, and the GA4 Measurement Protocol on Windows/Linux, into the same property, under the same consent. An edition supplies the stream through TelemetryConfig.measurementProtocol. Also: - app_version came from a constant stuck at 0.0.1; it is read from the build. - signed_in user property; first_template_open, first_component_added and first_compile_attempt milestones. - User properties are set again when consent is given mid-session (they were dropped while analytics was off), and consent is applied before the answer is published so listeners see analytics already on. - Buffered analytics is flushed on exit, alongside OpenTelemetry. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The drag edited the node and wire lists in place, and the wire painter only repaints when handed a different list, so the wires stayed behind until the drop. The drag now hands over fresh lists. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Windows and Linux users were never counted. The Firebase Flutter SDK has no Windows/Linux implementation, so
TelemetrySupport.analyticswas false there and those installs sent nothing.AnalyticsServicenow sends through anAnalyticsBackend: the Firebase SDK where it exists, and the GA4 Measurement Protocol (lib/core/telemetry/measurement_protocol.dart) on Windows/Linux, into the same property, under the same consent. Nothing is created, not even the client ID, until the user agrees. An edition supplies the stream through the new optionalTelemetryConfig.measurementProtocol;TelemetryConfig.firebaseis now optional too.On Windows/Linux, the backend handles the parts the SDK normally does:
first_visitover the protocol, so a new ID sendsfirst_launchinstead.session_id, which renews after 30 minutes idle, andengagement_time_msec, capped at 1 minute. GA4 needs both to count the user as active.page_view, because web streams refusescreen_view./debug/mp/collect, which validates and records nothing.Also in this PR:
app_versioncame from a constant that never moved. It is now read from the build (PackageInfo), and OpenTelemetry'sservice.versiongets the same value.signed_in(yes/no, never the account).first_template_open,first_component_added,first_compile_attempt.Merge before PinBench/pro#6 (pro depends on
pinbench_edition_apiatmain).How it was verified
flutter analyze: cleandart format lib test: no changesflutter test: 579 passed, 7 skipped. That includes 13 new tests intest/core/telemetry/measurement_protocol_test.dart(sessions, engagement, batching, consent, client-ID persistence, request shape) and the new drag test.Notes for the reviewer
first_launchevent, not in GA's "New users" metric.signed_inand the existingrun_platform,app_version,themeandentry_modeas user-scoped custom dimensions in GA4. Mark thefirst_*milestones as key events.🤖 Generated with Claude Code