Skip to content

Android: Additional data for wide events / pixels to track query purchase changes#8863

Merged
karlenDimla merged 2 commits into
developfrom
feature/karl/migratebillingv8/pixels
Jun 15, 2026
Merged

Android: Additional data for wide events / pixels to track query purchase changes#8863
karlenDimla merged 2 commits into
developfrom
feature/karl/migratebillingv8/pixels

Conversation

@karlenDimla

@karlenDimla karlenDimla commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Task/Issue URL: https://app.asana.com/1/137249556945/task/1215532568282106?focus=true
Tech Design URL (if applicable): https://app.asana.com/1/137249556945/project/481882893211075/task/1215021185439979?focus=true

Description

  • Inline the PurchaseInfoNotAvailable cause into the play_login_error wide-event field so token-refresh failures and recoverSubscriptionFromStore() failures distinguish "billing client not ready" from "query purchases failed" instead of collapsing both into a single label. Carried via LatestPurchaseResult.Unknown(cause) → StoreLoginResult.Failure.PurchaseInfoNotAvailable(cause).
  • Add m_privacy-pro_app_recover-subscription_no-active-purchase pixel (Count + Daily), fired when recoverSubscriptionFromStore() returns StoreLoginResult.Failure.NoActivePurchase — covers both the user-initiated restore flow and the auto-recovery during purchase. Wired through SubscriptionPixel/SubscriptionPixelSender and declared in PixelDefinitions/.../subscription_pixels.json5.

Steps to test this PR

QA-optional


Note

Medium Risk
Touches subscription auth refresh and store-recovery error paths; behavior for users is largely unchanged aside from richer failure telemetry and one new pixel on confirmed no-purchase restore.

Overview
Improves observability around Play Billing queryPurchases and store-login recovery by carrying low-cardinality cause tags through the purchase-query path instead of a single opaque failure label.

LatestPurchaseResult.Unknown is now a data class with cause (e.g. billing_client_not_ready, query_purchases_failed:…), propagated into StoreLoginResult.Failure.PurchaseInfoNotAvailable(cause). That cause is included in auth token refresh wide-event play_login_error when store login fails without sign-out, and in recoverSubscriptionFromStore() failure messages for the same failure type.

Adds pixel m_privacy-pro_app_recover-subscription_no-active-purchase (count + daily), fired only when recovery hits NoActivePurchase (confirmed empty Play purchase), including manual restore and auto-recovery during purchase—not when login succeeds but the backend subscription is inactive or when purchase info is unknown.

Reviewed by Cursor Bugbot for commit 7becaeb. Bugbot is set up for automated code reviews on this repo. Configure here.

Avoids adding a separate wide event field; the cause is appended to
the existing loginError as "PurchaseInfoNotAvailable - <cause>".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@karlenDimla karlenDimla force-pushed the feature/karl/migratebillingv8/pixels branch from 0732cb0 to 7becaeb Compare June 12, 2026 13:29
@github-actions

Copy link
Copy Markdown
Contributor

Privacy Review task: https://app.asana.com/0/69071770703008/1215658841043923

@lmac012 lmac012 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@karlenDimla karlenDimla merged commit 2e4fc54 into develop Jun 15, 2026
19 checks passed
@karlenDimla karlenDimla deleted the feature/karl/migratebillingv8/pixels branch June 15, 2026 07:36
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