Skip to content

Migrate select event to package:unified_analytics - #7479

Merged
kenzieschmoll merged 11 commits into
flutter:masterfrom
eliasyishak:migrate-select-event
Apr 29, 2024
Merged

kenzieschmoll merged 11 commits into
flutter:masterfrom
eliasyishak:migrate-select-event

Conversation

@eliasyishak

@eliasyishak eliasyishak commented Mar 27, 2024 •

Copy link
Copy Markdown
Contributor

Part of tracker issue:

Migrates the select analytics event to package:unified_analytics

EDIT: April 18
I have been able to confirm that the new DTD setup works as expected! As discussed a couple weeks ago, we will use just one event to send the different devtools event (same as the legacy devtools analytics). This one event will include a superset of all the parameters possible for all devtools related events (select, impressions, etc.). This is being added in package:unified_analytics in this PR.

The screenshot below shows the parameters that are being sent for the select event in the backend.

image

The highlighted field above for eventCategory will be how we filter for which devtools event we are interested in.

@eliasyishak eliasyishak changed the title Migrate select event Migrate select event to package:unified_analytics Mar 27, 2024
Comment on lines +666 to +689
userApp: gtagEvent.user_app,
userBuild: gtagEvent.user_build,
userPlatform: gtagEvent.user_platform,
devtoolsPlatform: gtagEvent.devtools_platform,
devtoolsChrome: gtagEvent.devtools_chrome,
devtoolsVersion: gtagEvent.devtools_version,
ideLaunched: gtagEvent.ide_launched,
isExternalBuild: gtagEvent.is_external_build,
isEmbedded: gtagEvent.is_embedded,
ideLaunchedFeature: gtagEvent.ide_launched_feature,
g3Username: gtagEvent.g3_username,
uiDurationMicros: gtagEvent.ui_duration_micros,
rasterDurationMicros: gtagEvent.raster_duration_micros,
shaderCompilationDurationMicros:
gtagEvent.shader_compilation_duration_micros,
traceEventCount: gtagEvent.trace_event_count,
cpuSampleCount: gtagEvent.cpu_sample_count,
cpuStackDepth: gtagEvent.cpu_stack_depth,
heapDiffObjectsBefore: gtagEvent.heap_diff_objects_before,
heapDiffObjectsAfter: gtagEvent.heap_diff_objects_after,
heapObjectsTotal: gtagEvent.heap_objects_total,
rootSetCount: gtagEvent.root_set_count,
rowCount: gtagEvent.row_count,
inspectorTreeControllerId: gtagEvent.inspector_tree_controller_id,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Even though we include all of the possible fields, most of these are nullable and if they are null when passed to Event.fromJson, those fields won't get sent to GA4

@kenzieschmoll

Copy link
Copy Markdown
Member

Will this PR also need a bump to the new unified_analytics version 6.1.0?

@eliasyishak

Copy link
Copy Markdown
Contributor Author

Yep, once dart-lang/tools#258 merges and publishes i'll bump the version here

@kenzieschmoll
kenzieschmoll marked this pull request as ready for review April 29, 2024 17:10
@kenzieschmoll
kenzieschmoll requested a review from a team as a code owner April 29, 2024 17:10
@kenzieschmoll
kenzieschmoll requested review from bkonyi and removed request for a team April 29, 2024 17:10
@kenzieschmoll
kenzieschmoll merged commit c6541da into flutter:master Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants