Skip to content

Commit

Permalink
Inmobi: user sync (#1911)
Browse files Browse the repository at this point in the history
  • Loading branch information
armon823 authored Jul 7, 2021
1 parent 394bbad commit 026e64a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
12 changes: 12 additions & 0 deletions adapters/inmobi/usersync.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package inmobi

import (
"text/template"

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

func NewInmobiSyncer(template *template.Template) usersync.Usersyncer {
return adapters.NewSyncer("inmobi", template, adapters.SyncTypeRedirect)
}
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ func (cfg *Configuration) setDerivedDefaults() {
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderGrid, "https://x.bidswitch.net/check_uuid/"+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dgrid%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%24%7BBSW_UUID%7D?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}")
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderGumGum, "https://rtb.gumgum.com/usync/prbds2s?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&r="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dgumgum%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D")
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderImprovedigital, "https://ad.360yield.com/server_match?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&r="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dimprovedigital%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%7BPUB_USER_ID%7D")
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderInMobi, "https://id5-sync.com/i/495/0.gif?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&callback="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dinmobi%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%7BID5UID%7D")
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderIx, "https://ssum.casalemedia.com/usermatchredir?s=194962&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&cb="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dix%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D")
// openrtb_ext.BidderInvibes doesn't have a good default.
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderJixie, "https://id.jixie.io/api/sync?pid=&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Djixie%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%25%25JXUID%25%25")
Expand Down
2 changes: 1 addition & 1 deletion static/bidder-info/inmobi.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
maintainer:
email: "prebid-support@inmobi.com"
email: "technology-irv@inmobi.com"
gvlVendorID: 333
capabilities:
app:
Expand Down
2 changes: 2 additions & 0 deletions usersync/usersyncers/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import (
"github.com/prebid/prebid-server/adapters/grid"
"github.com/prebid/prebid-server/adapters/gumgum"
"github.com/prebid/prebid-server/adapters/improvedigital"
"github.com/prebid/prebid-server/adapters/inmobi"
"github.com/prebid/prebid-server/adapters/invibes"
"github.com/prebid/prebid-server/adapters/ix"
"github.com/prebid/prebid-server/adapters/jixie"
Expand Down Expand Up @@ -150,6 +151,7 @@ func NewSyncerMap(cfg *config.Configuration) map[openrtb_ext.BidderName]usersync
insertIntoMap(cfg, syncers, openrtb_ext.BidderGrid, grid.NewGridSyncer)
insertIntoMap(cfg, syncers, openrtb_ext.BidderGumGum, gumgum.NewGumGumSyncer)
insertIntoMap(cfg, syncers, openrtb_ext.BidderImprovedigital, improvedigital.NewImprovedigitalSyncer)
insertIntoMap(cfg, syncers, openrtb_ext.BidderInMobi, inmobi.NewInmobiSyncer)
insertIntoMap(cfg, syncers, openrtb_ext.BidderInvibes, invibes.NewInvibesSyncer)
insertIntoMap(cfg, syncers, openrtb_ext.BidderIx, ix.NewIxSyncer)
insertIntoMap(cfg, syncers, openrtb_ext.BidderJixie, jixie.NewJixieSyncer)
Expand Down
2 changes: 1 addition & 1 deletion usersync/usersyncers/syncer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func TestNewSyncerMap(t *testing.T) {
string(openrtb_ext.BidderGrid): syncConfig,
string(openrtb_ext.BidderGumGum): syncConfig,
string(openrtb_ext.BidderImprovedigital): syncConfig,
string(openrtb_ext.BidderInMobi): syncConfig,
string(openrtb_ext.BidderInvibes): syncConfig,
string(openrtb_ext.BidderIx): syncConfig,
string(openrtb_ext.BidderJixie): syncConfig,
Expand Down Expand Up @@ -120,7 +121,6 @@ func TestNewSyncerMap(t *testing.T) {
openrtb_ext.BidderBidsCube: true,
openrtb_ext.BidderEpom: true,
openrtb_ext.BidderDecenterAds: true,
openrtb_ext.BidderInMobi: true,
openrtb_ext.BidderInteractiveoffers: true,
openrtb_ext.BidderKayzen: true,
openrtb_ext.BidderKidoz: true,
Expand Down

0 comments on commit 026e64a

Please sign in to comment.