-
Notifications
You must be signed in to change notification settings - Fork 737
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
UserSync activity #2897
UserSync activity #2897
Changes from 13 commits
ea46c83
5c9cff1
75b7e8b
b7d1ab5
5a388eb
2bdc95e
2cdc048
89272f2
f33bd5a
0e4eb7c
384c00b
695ab46
d64dfb8
cc2854a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -85,13 +85,17 @@ const ( | |||||
|
||||||
// StatusDuplicate specifies the bidder is a duplicate or shared a syncer key with another bidder choice. | ||||||
StatusDuplicate | ||||||
|
||||||
// StatusBlockedByPrivacy specifies a bidder sync url is not allowed by privacy activities | ||||||
StatusBlockedByPrivacy | ||||||
) | ||||||
|
||||||
// Privacy determines which privacy policies will be enforced for a user sync request. | ||||||
type Privacy interface { | ||||||
GDPRAllowsHostCookie() bool | ||||||
GDPRAllowsBidderSync(bidder string) bool | ||||||
CCPAAllowsBidderSync(bidder string) bool | ||||||
ActivityAllowsUserSync(bidder string) bool | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we rename to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Gus, activity name we execute here is prebid-server/privacy/activity.go Line 19 in 5723674
and this is how it is in configs: prebid-server/config/activity.go Line 4 in 5723674
I'm open to rename it if you think |
||||||
} | ||||||
|
||||||
// standardChooser implements the user syncer algorithm per official Prebid specification. | ||||||
|
@@ -151,6 +155,11 @@ func (c standardChooser) evaluate(bidder string, syncersSeen map[string]struct{} | |||||
return nil, BidderEvaluation{Status: StatusAlreadySynced, Bidder: bidder, SyncerKey: syncer.Key()} | ||||||
} | ||||||
|
||||||
userSyncActivityAllowed := privacy.ActivityAllowsUserSync(bidder) | ||||||
if !userSyncActivityAllowed { | ||||||
return nil, BidderEvaluation{Status: StatusBlockedByPrivacy, Bidder: bidder, SyncerKey: syncer.Key()} | ||||||
} | ||||||
|
||||||
if !privacy.GDPRAllowsBidderSync(bidder) { | ||||||
return nil, BidderEvaluation{Status: StatusBlockedByGDPR, Bidder: bidder, SyncerKey: syncer.Key()} | ||||||
} | ||||||
|
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 should probably record a metric and update the analytics object
so
here as well.For GDPR, the metric we use when the error is
http.StatusUnavailableForLegalReasons
ismetrics.SetUidGDPRHostCookieBlocked
. Maybe we need to add a more generic privacy related blocking metric likemetrics.SetUidPrivacyHostCookieBlocked
?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 discussed this offline and decided to add metrics in a separate PR.
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.
Using a generic metric is a good idea, especially as the number of privacy policies is expected to increase. IMHO the existign GDPR and CCPA metrics could use the new generalized privacy blocking metric.