- Notifications
You must be signed in to change notification settings - Fork 1.1k
Subscription status attributed metric implementation #7029
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
base: feature/cristian/duck_ai_attributed_metric
Are you sure you want to change the base?
Subscription status attributed metric implementation #7029
Conversation
| Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
d3ce0d5 to 7a065ec Compare c806241 to ae51b0a Compare 7a065ec to b571b15 Compare ae51b0a to 2a80cb9 Compare b571b15 to cafc989 Compare 2a80cb9 to 25fae75 Compare cafc989 to 4316a72 Compare 25fae75 to e756157 Compare 4316a72 to 893affe Compare e756157 to 2d26775 Compare 893affe to 5e1bfbd Compare 2d26775 to b3c04fc Compare 5e1bfbd to 966feda Compare b3c04fc to ae26108 Compare | pixelSender.reportSubscriptionActivated() | ||
| emitEntitlementsValues() | ||
| _currentPurchaseState.emit(CurrentPurchase.Success) | ||
| authRepository.registerLocalPurchasedAt() |
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.
@lmac012 this is what I asked you last week. A place where to store purchase date. FYI
| authRepository.setAccount(null) | ||
| authRepository.setSubscription(null) | ||
| authRepository.setEntitlements(emptyList()) | ||
| authRepository.removeLocalPurchasedAt() |
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.
@lmac012 related to my question last week, this is where I'm removing purchased at date.
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.
LGTM, left one comment but nothing that needs changing.
| } | ||
| | ||
| override suspend fun registerLocalPurchasedAt() { | ||
| subscriptionsDataStore.localPurchasedAt = System.currentTimeMillis() |
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.
Just FYI you are directly storing the system time rather than storing it in ET. Nothing wrong with that but we will have to convert to ET every time we want to compare it.

Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1211382557175162?focus=true
Description
Steps to test this PR
Use logcat filter
tag~:"AttributedMetrics"➡️ Go to
PrivacyFeatureNameclass and replace url byhttps://api.jsonblob.com/019a4fb1-89b3-7971-8c77-ab77969a5874Feature 1
Client status running: true -> isActive: true, isEnabled: trueFired pixel user_subscribed with params {month=0}Feature 2
AuthRepositorymethodisFreeTrialActiveand hardcodefalseFired pixel user_subscribed with params {month=1}Fired pixel user_subscribed with params {month=2}UI changes