Skip to content

Add funnel origins to native subscription purchase entry points#9142

Open
cmonfortep wants to merge 1 commit into
developfrom
feature/cristian/subscriptions/fix_missing_origin_purchase
Open

Add funnel origins to native subscription purchase entry points#9142
cmonfortep wants to merge 1 commit into
developfrom
feature/cristian/subscriptions/fix_missing_origin_purchase

Conversation

@cmonfortep

@cmonfortep cmonfortep commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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

Description

Three native entry points launched the subscription purchase WebView with a null origin, so the subscription-purchase wide event recorded an empty context.name and those funnels could not be attributed.

  • Duck.ai omnibar free-tier "Upgrade" pill (NativeInputManager) → funnel_duckai_android__freelabel (only reachable for free users, gated in
    NativeInputOmnibarController.updateTierTitle)
  • Subscription settings "View Plans" for expired/inactive users (SubscriptionSettingsActivity) → funnel_subscriptionsettings_android__viewplans
  • Restore → "Subscription not found" → "View Plans" (RestoreSubscriptionActivity) → funnel_restore_android__viewplans

Out of scope by design: switch/upgrade-only surfaces (e.g. the active-subscriber "View all plans", which routes to the plan-switch flow, not purchase) and
FE-controlled origins

Steps to test this PR

Duck.ai free-tier upgrade pill

  • As a non-subscriber, open Duck.ai and tap the "Upgrade" pill in the omnibar header
  • Confirm the purchase flow opens and the wide_subscription-purchase event carries context.name = funnel_duckai_android__freelabel

Subscription settings "View Plans" (expired/inactive)

  • With an expired/inactive subscription, open Subscription Settings and tap "View Plans"
  • Confirm the wide_subscription-purchase event carries context.name = funnel_subscriptionsettings_android__viewplans

Restore "Subscription not found"

  • Start the restore flow with an account that has no subscription, then tap "View Plans" in the "Subscription not found" dialog
  • Confirm the wide_subscription-purchase event carries context.name = funnel_restore_android__viewplans

UI changes

Before After
!(Upload before screenshot) (Upload after screenshot)

Note

Low Risk
Analytics-only parameter wiring on existing purchase navigation; no changes to billing, auth, or subscription state logic.

Overview
Native subscription purchase flows previously launched with a null origin, so wide_subscription-purchase events had an empty context.name and those funnels could not be attributed.

This PR threads distinct funnel origin strings into three Android entry points: Duck.ai omnibar Upgrade (funnel_duckai_android__freelabel via SubscriptionPurchase), subscription settings View Plans for expired/inactive users (funnel_subscriptionsettings_android__viewplans), and restore Subscription not found → View Plans (funnel_restore_android__viewplans through an optional origin on startSubscriptionsWebViewActivity). Plan-switch and other non-purchase routes are unchanged.

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

Three native entry points launched the purchase WebView with a null
origin, so the subscription-purchase wide event recorded an empty
context.name and those funnels couldn't be attributed:

- Duck.ai omnibar free-tier upgrade pill (NativeInputManager)
- Subscription-settings "View Plans" for expired/inactive users
- Restore "Subscription not found" -> "View Plans"

Each now passes a funnel origin (declared as a PURCHASE_ORIGIN constant).
Switch-only and FE-controlled entry points are unaffected.

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

Copy link
Copy Markdown
Contributor Author

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

@cmonfortep cmonfortep marked this pull request as ready for review July 8, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants