-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Attributed metrics module and skeleton #6887
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: develop
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
3309dae
to
54292a7
Compare
eventRepository.getEventStats(eventName, days) | ||
} | ||
|
||
// TODO: Pending adding default attributed metrics and removing default prefix from pixel names |
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.
This will happen on future PRs
54292a7
to
fe91bc1
Compare
e6b6bc4
to
831e0ec
Compare
831e0ec
to
c8c63fb
Compare
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 a few comments
@@ -0,0 +1,4 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
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.
nit: I don't think we need the baseline file
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.
It was needed, lint failed and I had to create the baseline.
generateDaggerFactories = true // default is false | ||
} | ||
lintOptions { | ||
baseline file("lint-baseline.xml") |
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.
nit: don't think we need this since there are no linting issues
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.
ditto
|
||
package com.duckduckgo.app.attributed.metrics | ||
|
||
internal interface AttributedMetricsState { |
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.
Kinda confused by this, you also have another AttributedMetricsState
but with isActive
... maybe the fact that the interface name is the same? Also not sure if this used?
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.
It can be removed, leftover when refactoring some code. It got replaced by the other one with same name.
|
||
@ContributesBinding(AppScope::class) | ||
class RealAttributedMetricsDateUtils @Inject constructor() : AttributedMetricsDateUtils { | ||
override fun getCurrentDate(): String = getCurrentLocalDate().format(DATE_FORMATTER) |
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.
Didn't we say to use ET? Can't really remember but it rings a bell.
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.
We don't store time, just date. So this is just storing events on the device date. You mentioned ET time in one kickoff project, but we didn't discuss that further and I haven't considered that.
Trying to reason this, I believe what you say is: a user can install the app, and in their same day, they can receive 2 different atb because it's calculated by ET time, even for the user is same day. Is that correct? I can take that offline and revisit.
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.
Follow-up: we migrate to ET time.
https://app.asana.com/1/137249556945/project/72649045549333/task/1211587142871285?focus=true
|
||
@Dao | ||
interface EventDao { | ||
@Transaction |
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.
Why is this one a transaction? I find it weird to have one on a normal query.
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.
removed
0602cd7
to
1e2a8db
Compare
Task/Issue URL: https://app.asana.com/1/137249556945/project/1202552961248957/task/1211500171306010?focus=true
Description
Scope
Steps to test this PR
While testing this PR you need to add the following in your logcat filter:
tag~:"AttributedMetrics"
Feature 1
New install detected, attributed metrics active
Client status running: true...
attributedMetrics
FFPrivacy config downloaded, attributed metrics enabled: false
(that should disable the client)Client status running: false -> isActive: true, isEnabled: false...
Feature 2
App reinstall detected, attributed metrics will not be active
Client status running: false -> isActive: false, isEnabled: true...
UI changes