-
Notifications
You must be signed in to change notification settings - Fork 102
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
Add VIP_GO_APP_ID to telemetry event data #5922
base: develop
Are you sure you want to change the base?
Conversation
I branched these changes from #5921, so probably best to merge those first. |
Should we just remove that block? On VIP, the user id should be set based on the hashed email (the VIP_TELEMETRY_SALT block above). |
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.
Left some suggestions on this.
It would be nice to cleanup the other props as well (i.e. change any references of vipgo_
to vip_
(e.g. vipgo_env
), although I realize that is increasing the scope of this PR :)
Separately, what do you think about adding the home or site URL as a prop? (vip_home_url
). The ID is helpful, but the URL would make sorting through data easier.
// Set VIP organization if it exists. | ||
if ( defined( 'VIP_ORG_ID' ) ) { | ||
$org_id = constant( 'VIP_ORG_ID' ); | ||
if ( is_string( $org_id ) && '' !== $org_id ) { | ||
if ( is_integer( $org_id ) && $org_id > 0 ) { | ||
$event->vipgo_org = $org_id; |
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.
Similar to the app change, let's rename this:
$event->vipgo_org = $org_id; | |
$event->vip_org_id = $org_id; |
Co-authored-by: Mohammad Jangda <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5922 +/- ##
=============================================
+ Coverage 30.26% 30.29% +0.03%
- Complexity 4812 4815 +3
=============================================
Files 287 287
Lines 20707 20699 -8
=============================================
+ Hits 6267 6271 +4
+ Misses 14440 14428 -12 ☔ View full report in Codecov by Sentry. |
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.
It sounds like we addressed all @mjangda's suggestions.
Quality Gate passedIssues Measures |
WP nightly tests are broken, probably unrelated to this PR. |
Description
This PR extends the recent Tracks telemetry work (#5869, #5921) to include VIP app IDs in a separate field on events. We already utilize app IDs for user identification:
vip-go-mu-plugins/telemetry/tracks/class-tracks-event.php
Lines 206 to 214 in 7508ea9
This tracks
userids
with values in the format{{site_id}}_{{wp_user_id}}
. This is less useful for tracking per-app events, since we'd require parsing and preprocessing event data. This PR serves to explicitly track app IDs in a separate data point to make filtering easier. Note that we already track the app environment (e.g.local
/develop
) as well as organization ID, so this fits right in.Changelog Description
Changed
VIP_GO_APP_ID
to Tracks telemetry eventsPre-review checklist
Please make sure the items below have been covered before requesting a review:
Pre-deploy checklist
Steps to Test
Run unit tests: