Analytics: Attach the selected site to My Site dashboard card impressions - #25882
Open
jkmassel wants to merge 1 commit into
Open
Analytics: Attach the selected site to My Site dashboard card impressions#25882jkmassel wants to merge 1 commit into
jkmassel wants to merge 1 commit into
Conversation
Collaborator
Generated by 🚫 Danger |
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 33657 | |
| Version | PR #25882 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 2617daa | |
| Installation URL | 1p8ofseeuhsb0 |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 33657 | |
| Version | PR #25882 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 2617daa | |
| Installation URL | 6di7h5eeg5m7o |
jkmassel
commented
Aug 7, 2026
| contentView.addSubview(frameView) | ||
| contentView.pinSubviewToAllEdges(frameView, priority: UILayoutPriority(999)) | ||
| } | ||
|
|
Contributor
Author
There was a problem hiding this comment.
This wasn't called anywhere
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.


The My Site dashboard shows exactly one site, but
my_site_dashboard_card_shownfired without ablog_idfor two of its cards — posts and Blaze — so Data Science measured the site present on only 56.1% ofjpios_my_site_dashboard_card_shownrows over a 14-day window (6,510,007 fires). This attaches the site to every card's impression.Root cause
BlogDashboardAnalytics.track(_:properties:blog:)tookblogas an optional defaulting tonil, and only routed through the site-attaching path when a blog was supplied:Of the six cards that fire the event, three passed
blog(activity_log,todays_stats,pages) and three did not:post— whose two sub-types are the highest-volume rows — andblaze. The optional made it possible to add a card and ship it without a site, which is how coverage drifted to ~56%.Changes
blog.BlogDashboardAnalytics.tracknow takes a non-optionalBlogand always callsWPAnalytics.track(_:properties:blog:), which setsblog_idto the site'sdotComID. The dashboard always has one site, so the type system now guarantees every impression carries it and no future card can drop it. This mirrors Android'strackWithSiteDetails(...).PostsCardViewModel— pass the view model'sblogfor the.postsand.errorsub-types.DashboardBlazeCardCell— thread the already-unwrappedblogfromupdate(with:)into the card-shown call.DashboardPostsListCardCell— deletetrackPostsDisplayed(). It fired the same event without a site but had no callers; the live posts impression isPostsCardViewModel.trackCardDisplayedIfNeeded(). Removing it closes a path that would double-count if it were ever wired up.The three cards that already passed
blogare unchanged.Not in this PR
blog_idcomes fromblog.dotComID, which isnilfor self-hosted sites, so those impressions still carry no site — the same behavior as the three already-correct cards, and the reason the target is ~95% rather than 100%.dynamic_dashboard_card_shownandfree_to_paid_plan_dashboard_card_shownare separate events.Test plan
🔵 Tracked: my_site_dashboard_card_shown <blog_id: <site id>, sub_type: …, type: …>— confirm thepostandblazelines now includeblog_id(they previously had none).blog_id_pctforjpios_my_site_dashboard_card_shownandwpios_my_site_dashboard_card_shownis at or above 95.Related