Add funnel origins to native subscription purchase entry points#9142
Open
cmonfortep wants to merge 1 commit into
Open
Add funnel origins to native subscription purchase entry points#9142cmonfortep wants to merge 1 commit into
cmonfortep wants to merge 1 commit into
Conversation
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>
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.

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
nullorigin, so thesubscription-purchasewide event recorded an emptycontext.nameand those funnels could not be attributed.NativeInputManager) →funnel_duckai_android__freelabel(only reachable for free users, gated inNativeInputOmnibarController.updateTierTitle)SubscriptionSettingsActivity) →funnel_subscriptionsettings_android__viewplansRestoreSubscriptionActivity) →funnel_restore_android__viewplansOut 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
wide_subscription-purchaseevent carriescontext.name = funnel_duckai_android__freelabelSubscription settings "View Plans" (expired/inactive)
wide_subscription-purchaseevent carriescontext.name = funnel_subscriptionsettings_android__viewplansRestore "Subscription not found"
wide_subscription-purchaseevent carriescontext.name = funnel_restore_android__viewplansUI changes
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, sowide_subscription-purchaseevents had an emptycontext.nameand 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__freelabelviaSubscriptionPurchase), subscription settings View Plans for expired/inactive users (funnel_subscriptionsettings_android__viewplans), and restore Subscription not found → View Plans (funnel_restore_android__viewplansthrough an optionaloriginonstartSubscriptionsWebViewActivity). 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.