-
Notifications
You must be signed in to change notification settings - Fork 0
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
Stop using Advertising Id in track and match requests #39
Conversation
daca4de
to
9af97c8
Compare
Codecov Report
@@ Coverage Diff @@
## master #39 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 8 6 -2
Lines 151 117 -34
Branches 21 19 -2
======================================
+ Misses 151 117 -34
Continue to review full report at Codecov.
|
*/ | ||
data class UserId(val type: String, val id: String) | ||
data class UserId(val id: String, val type: String = "gaid") { |
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.
Not related to this PR directly, but should we prevent empty id
s?
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.
Fixed in f19f929
Velocidi.getInstance().match("provider1", listOf(UserId("eml", "mail@example.com"))) | ||
Velocidi.getInstance().match( | ||
"provider1", | ||
listOf(UserId("123"), UserId("mail@example.com", "eml")) |
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.
Nitpick: can we remove literal email examples? This example in particular is not consistent with the id type and I think we should avoid exemplifying plain emails... Can we use a proper sha256 example here and in other examples?
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.
I think I replace all the references of plain email in 57eeb21
* | ||
* @param providerId Id of the match provider | ||
* @param userIds List of user ids to be linked along with Advertising Id | ||
* @param userIds List of user ids to be linked | ||
*/ | ||
fun match(providerId: String, userIds: List<UserId>) { |
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.
Not directly related to this PR, but can/should we force a non-empty list of ids?
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.
Done in 87c2b67
1317350
to
35314fd
Compare
35314fd
to
57eeb21
Compare
Looks good. Waiting on the approval from @silva95gustavo. |
Good job @dimamo5! |
Depends on #38
Fetching and using the Advertising Id implicitly on
track
andmatch
requests may lead the client app to break some privacy rules. It is also problematic on devices that don't use Google services or in devices with have stricter privacy settings. To avoid dealing with such issues we decided to shift the responsibility of using Google's Advertising Id to the client app.So, this PR changes the
track
method to accept anUserId
and stops fetching the Advertising Id oninit
and using it on track and match requests.