forked from prebid/prebid-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
usersync.go
39 lines (33 loc) · 1.57 KB
/
usersync.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package usersync
import "github.com/prebid/prebid-server/privacy"
type Usersyncer interface {
// GetUsersyncInfo returns basic info the browser needs in order to run a user sync.
// The returned UsersyncInfo object must not be mutated by callers.
//
// For more information about user syncs, see http://clearcode.cc/2015/12/cookie-syncing/
GetUsersyncInfo(privacyPolicies privacy.Policies) (*UsersyncInfo, error)
// FamilyName should be the same as the `BidderName` for this Usersyncer.
// This function only exists for legacy reasons.
// TODO #362: when the appnexus usersyncer is consistent, delete this and use the key
// of NewSyncerMap() here instead.
FamilyName() string
// GDPRVendorID returns the ID in the IAB Global Vendor List which refers to this Bidder.
//
// The Global Vendor list can be found here: https://vendorlist.consensu.org/vendorlist.json
// Bidders can register for the list here: https://register.consensu.org/
//
// If you're not on the list, this should return 0. If cookie sync requests have GDPR consent info,
// or the Prebid Server host company configures its deploy to be "cautious" when no GDPR info exists
// in the request, it will _not_ sync user IDs with you.
GDPRVendorID() uint16
}
type UsersyncInfo struct {
URL string `json:"url,omitempty"`
Type string `json:"type,omitempty"`
SupportCORS bool `json:"supportCORS,omitempty"`
}
type CookieSyncBidders struct {
BidderCode string `json:"bidder"`
NoCookie bool `json:"no_cookie,omitempty"`
UsersyncInfo *UsersyncInfo `json:"usersync,omitempty"`
}