Skip to content

Commit

Permalink
Hoist GVL ID To Bidder Info (prebid#1721)
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxNode authored and Dan Barnett committed May 11, 2021
1 parent f7584b4 commit fd39422
Show file tree
Hide file tree
Showing 231 changed files with 206 additions and 259 deletions.
2 changes: 1 addition & 1 deletion adapters/33across/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func New33AcrossSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("33across", 58, temp, adapters.SyncTypeIframe)
return adapters.NewSyncer("33across", temp, adapters.SyncTypeIframe)
}
1 change: 0 additions & 1 deletion adapters/33across/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ func Test33AcrossSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://ic.tynt.com/r/d?m=xch&rt=html&gdpr=A&gdpr_consent=B&us_privacy=C&ru=%2Fsetuid%3Fbidder%3D33across%26uid%3D33XUSERID33X&id=zzz000000000002zzz", syncInfo.URL)
assert.Equal(t, "iframe", syncInfo.Type)
assert.EqualValues(t, 58, syncer.GDPRVendorID())
assert.False(t, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/acuityads/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func NewAcuityAdsSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("acuityads", 231, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("acuityads", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/acuityads/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ func TestAcuityAdsSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://cs.admanmedia.com/sync/prebid?gdpr=0&gdpr_consent=ANDFJDS&us_privacy=1-YY&redir=http%3A%2F%2Flocalhost%3A8000%2Fsetuid%3Fbidder%3Dacuityads%26uid%3D%5BUID%5D", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 231, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/adform/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func NewAdformSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("adform", 50, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("adform", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/adform/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ func TestAdformSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "//cm.adform.net?return_url=localhost%2Fsetuid%3Fbidder%3Dadform%26gdpr%3D1%26gdpr_consent%3DBONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw%26uid%3D%24UID", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 50, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
4 changes: 1 addition & 3 deletions adapters/adkernel/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import (
"github.com/prebid/prebid-server/usersync"
)

const adkernelGDPRVendorID = uint16(14)

func NewAdkernelSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("adkernel", 14, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("adkernel", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/adkernel/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ func TestAdkernelAdnSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://sync.adkernel.com/user-sync?t=image&gdpr=1&gdpr_consent=BONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw&us_privacy=1NYN&r=https%3A%2F%2Flocalhost%3A8888%2Fsetuid%3Fbidder%3Dadkernel%26gdpr%3D1%26gdpr_consent%3DBONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw%26uid%3D%7BUID%7D", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, adkernelGDPRVendorID, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
4 changes: 1 addition & 3 deletions adapters/adkernelAdn/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import (
"github.com/prebid/prebid-server/usersync"
)

const adkernelGDPRVendorID = uint16(14)

func NewAdkernelAdnSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("adkernelAdn", 14, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("adkernelAdn", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/adkernelAdn/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ func TestAdkernelAdnSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://tag.adkernel.com/syncr?gdpr=1&gdpr_consent=BONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw&us_privacy=1NYN&r=https%3A%2F%2Flocalhost%3A8888%2Fsetuid%3Fbidder%3DadkernelAdn%26gdpr%3D1%26gdpr_consent%3DBONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw%26uid%3D%7BUID%7D", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, adkernelGDPRVendorID, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/adman/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ import (

// NewAdmanSyncer returns adman syncer
func NewAdmanSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("adman", 149, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("adman", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/adman/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ func TestAdmanSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://sync.admanmedia.com/pbs.gif?gdpr=0&gdpr_consent=ANDFJDS&us_privacy=1-YY&redir=http%3A%2F%2Flocalhost%3A8000%2Fsetuid%3Fbidder%3Dadman%26uid%3D%5BUID%5D", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 149, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
5 changes: 3 additions & 2 deletions adapters/admixer/usersync.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package admixer

import (
"text/template"

"github.com/prebid/prebid-server/adapters"
"github.com/prebid/prebid-server/usersync"
"text/template"
)

func NewAdmixerSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("admixer", 511, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("admixer", temp, adapters.SyncTypeRedirect)
}
2 changes: 1 addition & 1 deletion adapters/admixer/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ func TestAdmixerSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "http://anyHost/anyPath", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 511, syncer.GDPRVendorID())

assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/adocean/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func NewAdOceanSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("adocean", 328, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("adocean", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/adocean/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ func TestAdOceanSyncer(t *testing.T) {
syncInfo.URL,
)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 328, syncer.GDPRVendorID())
}
2 changes: 0 additions & 2 deletions adapters/adpone/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ import (
"github.com/prebid/prebid-server/usersync"
)

const adponeGDPRVendorID = uint16(799)
const adponeFamilyName = "adpone"

func NewadponeSyncer(urlTemplate *template.Template) usersync.Usersyncer {
return adapters.NewSyncer(
adponeFamilyName,
adponeGDPRVendorID,
urlTemplate,
adapters.SyncTypeRedirect,
)
Expand Down
1 change: 0 additions & 1 deletion adapters/adpone/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ func TestAdponeSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://usersync.adpone.com/csync?t=p&ep=0&redir=localhost%2Fsetuid%3Fbidder%3Dadtelligent%26gdpr%3D%26gdpr_consent%3D%26uid%3D%7Buid%7D", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, adponeGDPRVendorID, syncer.GDPRVendorID())
}
2 changes: 1 addition & 1 deletion adapters/adtarget/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func NewAdtargetSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("adtarget", 0, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("adtarget", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/adtarget/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@ func TestAdtargetSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "//sync.console.adtarget.com.tr/csync?t=p&ep=0&gdpr=0&gdpr_consent=123&us_privacy=1-YY&redir=localhost%2Fsetuid%3Fbidder%3Dadtarget%26gdpr%3D0%26gdpr_consent%3D123%26uid%3D%7Buid%7D", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 0, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/adtelligent/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func NewAdtelligentSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("adtelligent", 410, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("adtelligent", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/adtelligent/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@ func TestAdtelligentSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "//sync.adtelligent.com/csync?t=p&ep=0&redir=localhost%2Fsetuid%3Fbidder%3Dadtelligent%26gdpr%3D0%26gdpr_consent%3D%26uid%3D%7Buid%7D", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 410, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/advangelists/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func NewAdvangelistsSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("advangelists", 0, temp, adapters.SyncTypeIframe)
return adapters.NewSyncer("advangelists", temp, adapters.SyncTypeIframe)
}
1 change: 0 additions & 1 deletion adapters/advangelists/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ func TestAdvangelistsSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://nep.advangelists.com/xp/user-sync?acctid={aid}&&redirect=localhost/setuid?bidder=advangelists&gdpr=1&gdpr_consent=BOPVK28OVJoTBABABAENBs-AAAAhuAKAANAAoACwAGgAPAAxAB0AHgAQAAiABOADkA&uid=$UID", syncInfo.URL)
assert.Equal(t, "iframe", syncInfo.Type)
assert.EqualValues(t, 0, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/adyoulike/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func NewAdyoulikeSyncer(urlTemplate *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("adyoulike", 259, urlTemplate, adapters.SyncTypeRedirect)
return adapters.NewSyncer("adyoulike", urlTemplate, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/adyoulike/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ func TestAdyoulikeSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "//visitor.omnitagjs.com/visitor/bsync?uid=19340f4f097d16f41f34fc0274981ca4&name=PrebidServer&gdpr_consent_string=BONciguONcjGKADACHENAOLS1rAHDAFAAEAASABQAMwAeACEAFw&gdpr=1&us_privacy=1-YY", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 259, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/aja/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func NewAJASyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("aja", 0, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("aja", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/aja/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ func TestAJASyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://ad.as.amanad.adtdp.com/v1/sync/ssp?ssp=4&gdpr=1&us_privacy=C&redir=localhost/setuid?bidder=aja&gdpr=1&gdpr_consent=BOPVK28OVJoTBABABAENBs-AAAAhuAKAANAAoACwAGgAPAAxAB0AHgAQAAiABOADkA&uid=%s", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 0, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/amx/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ import (

// NewAMXSyncer produces an AMX RTB usersyncer
func NewAMXSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("amx", 737, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("amx", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/amx/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ func TestAMXSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "http://pbs.amxrtb.com/cchain/0?gdpr=&gdpr_consent=&cb=localhost%2Fsetuid%3Fbidder%3Damx%26uid%3D", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 737, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/appnexus/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func NewAppnexusSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("adnxs", 32, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("adnxs", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/appnexus/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ func TestAppNexusSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "//ib.adnxs.com/getuid?https%3A%2F%2Fprebid.adnxs.com%2Fpbs%2Fv1%2Fsetuid%3Fbidder%3Dadnxs%26gdpr%3D%26gdpr_consent%3D%26uid%3D%24UID", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 32, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/audienceNetwork/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func NewFacebookSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("audienceNetwork", 0, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("audienceNetwork", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/audienceNetwork/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ func TestFacebookSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://www.facebook.com/audiencenetwork/idsync/?partner=partnerId&callback=localhost%2Fsetuid%3Fbidder%3DaudienceNetwork%26gdpr%3D%26gdpr_consent%3D%26uid%3D%24UID", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 0, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/avocet/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func NewAvocetSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("avocet", 63, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("avocet", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/avocet/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ func TestAvocetSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://ads.avct.cloud/getuid?&gdpr=1&gdpr_consent=ConsentString&us_privacy=PrivacyString&url=%2Fsetuid%3Fbidder%3Davocet%26gdpr%3D1%26gdpr_consent%3DConsentString%26uid%3D%7B%7BUUID%7D%7D", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 63, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
3 changes: 0 additions & 3 deletions adapters/beachfront/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ import (
"github.com/prebid/prebid-server/usersync"
)

var VENDOR_ID uint16 = 335

func NewBeachfrontSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer(
"beachfront",
VENDOR_ID,
temp,
adapters.SyncTypeIframe)
}
1 change: 0 additions & 1 deletion adapters/beachfront/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ func TestBeachfrontSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://sync.bfmio.com/sync_s2s?gdpr=A&us_privacy=C&url=https%3A%2F%2Flocalhost%3A8888%2Fsetuid%3Fbidder%3Dbeachfront%26gdpr%3DA%26gdpr_consent%3DB%26uid%3D%5Bio_cid%5D", syncInfo.URL)
assert.Equal(t, "iframe", syncInfo.Type)
assert.EqualValues(t, uint16(335), syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/beintoo/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func NewBeintooSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("Beintoo", 618, temp, adapters.SyncTypeIframe)
return adapters.NewSyncer("Beintoo", temp, adapters.SyncTypeIframe)
}
1 change: 0 additions & 1 deletion adapters/beintoo/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ func TestBeintooSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://ib.beintoo.com/um?ssp=pbs&gdpr=1&gdpr_consent=BOPVK28OVJoTBABABAENBs-AAAAhuAKAANAAoACwAGgAPAAxAB0AHgAQAAiABOADkA&us_privacy=1NYN&redirect=localhost%2Fsetuid%3Fbidder%3Dbeintoo%26uid%3D%24UID", syncInfo.URL)
assert.Equal(t, "iframe", syncInfo.Type)
assert.EqualValues(t, 618, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/between/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ import (

// NewBetweenSyncer returns "between" syncer
func NewBetweenSyncer(template *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("between", 724, template, adapters.SyncTypeRedirect)
return adapters.NewSyncer("between", template, adapters.SyncTypeRedirect)
}
6 changes: 3 additions & 3 deletions adapters/between/usersync_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package between

import (
"github.com/prebid/prebid-server/privacy"
"github.com/stretchr/testify/assert"
"testing"
"text/template"

"github.com/prebid/prebid-server/privacy"
"github.com/stretchr/testify/assert"
)

func TestNewBetweenSyncerSyncer(t *testing.T) {
Expand All @@ -19,6 +20,5 @@ func TestNewBetweenSyncerSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://ads.betweendigital.com/match?bidder_id=pbs&gdpr=&gdpr_consent=&us_privacy=&callback_url=localhost:8080%2Fsetuid%3Fbidder%3Dbetween%26gdpr%3D0%26gdpr_consent%3D%26uid%3D%24%7BUSER_ID%7D", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 724, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/brightroll/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func NewBrightrollSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("brightroll", 25, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("brightroll", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/brightroll/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ func TestBrightrollSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "http://test-bh.ybp.yahoo.com/sync/appnexuspbs?gdpr=&euconsent=&us_privacy=&url=localhost%2Fsetuid%3Fbidder%3Dbrightroll%26gdpr%3D%26gdpr_consent%3D%26uid%3D%24%7BUID%7D", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 25, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/colossus/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ import (

// NewColossusSyncer returns colossus syncer
func NewColossusSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("colossus", 0, temp, adapters.SyncTypeRedirect)
return adapters.NewSyncer("colossus", temp, adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/colossus/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ func TestColossusSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://sync.colossusssp.com/pbs.gif?gdpr=0&gdpr_consent=A&us_privacy=1-YY&redir=http%3A%2F%2Flocalhost%3A8000%2Fsetuid%3Fbidder%3Dcolossus%26uid%3D%5BUID%5D", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 0, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
2 changes: 1 addition & 1 deletion adapters/connectad/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (
)

func NewConnectAdSyncer(temp *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("connectad", 138, temp, adapters.SyncTypeIframe)
return adapters.NewSyncer("connectad", temp, adapters.SyncTypeIframe)
}
1 change: 0 additions & 1 deletion adapters/connectad/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ func TestConnectAdSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "https://cdn.connectad.io/connectmyusers.php?gdpr=1&consent=fakeconsent&us_privacy=fake&cb=localhost%2Fsetuid%3Fbidder%3Dconnectad%26gdpr%3D1%26gdpr_consent%3Dfakeconsent%26uid%3D%24UID", syncInfo.URL)
assert.Equal(t, "iframe", syncInfo.Type)
assert.EqualValues(t, 138, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
}
4 changes: 0 additions & 4 deletions adapters/consumable/usersync.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@ import (
"github.com/prebid/prebid-server/usersync"
)

var VENDOR_ID uint16 = 591

func NewConsumableSyncer(temp *template.Template) usersync.Usersyncer {

return adapters.NewSyncer(
"consumable",
VENDOR_ID,
temp,
adapters.SyncTypeRedirect)
}
1 change: 0 additions & 1 deletion adapters/consumable/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ func TestConsumableSyncer(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, "//e.serverbid.com/udb/9969/match?gdpr=A&euconsent=B&us_privacy=C&redir=http%3A%2F%2Flocalhost%3A8000%2Fsetuid%3Fbidder%3Dconsumable%26gdpr%3DA%26gdpr_consent%3DB%26uid%3D", u.URL)
assert.Equal(t, "redirect", u.Type)
assert.Equal(t, uint16(591), syncer.GDPRVendorID())
assert.Equal(t, false, u.SupportCORS)
}
Loading

0 comments on commit fd39422

Please sign in to comment.