Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Commit

Permalink
Gamoshi Adapter: Update cookie sync (prebid#1146)
Browse files Browse the repository at this point in the history
  • Loading branch information
Salomon Rada authored and SyntaxNode committed Dec 16, 2019
1 parent 2844ea0 commit 25a9e8d
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion adapters/gamoshi/gamoshi.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (a *GamoshiAdapter) MakeRequests(request *openrtb.BidRequest, reqInfo *adap
if len(thisURI) == 0 {
thisURI = "https://rtb.gamoshi.io"
}
thisURI = thisURI + "/r/" + gamoshiExt.SupplyPartnerId + "/bidr?reqformat=RTB_JSON"
thisURI = thisURI + "/r/" + gamoshiExt.SupplyPartnerId + "/bidr?bidder=prebid-server"
headers := http.Header{}
headers.Add("Content-Type", "application/json;charset=utf-8")
headers.Add("Accept", "application/json")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "https://rtb.gamoshi.io/r/1707/bidr?reqformat=RTB_JSON",
"uri": "https://rtb.gamoshi.io/r/1707/bidr?bidder=prebid-server",
"body": {
"id": "test-request-id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "https://rtb.gamoshi.io/r/1707/bidr?reqformat=RTB_JSON",
"uri": "https://rtb.gamoshi.io/r/1707/bidr?bidder=prebid-server",
"body": {
"id": "test-request-id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "https://rtb.gamoshi.io/r/1707/bidr?reqformat=RTB_JSON",
"uri": "https://rtb.gamoshi.io/r/1707/bidr?bidder=prebid-server",
"body": {
"id": "test-request-id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "https://rtb.gamoshi.io/r/1707/bidr?reqformat=RTB_JSON",
"uri": "https://rtb.gamoshi.io/r/1707/bidr?bidder=prebid-server",
"body": {
"id": "test-request-id",
"imp": [
Expand Down
2 changes: 1 addition & 1 deletion adapters/gamoshi/gamoshitest/exemplary/simple-banner.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "https://rtb.gamoshi.io/r/1707/bidr?reqformat=RTB_JSON",
"uri": "https://rtb.gamoshi.io/r/1707/bidr?bidder=prebid-server",
"body": {
"id": "test-request-id",
"imp": [
Expand Down
2 changes: 1 addition & 1 deletion adapters/gamoshi/gamoshitest/exemplary/simple-video.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "https://rtb.gamoshi.io/r/1707/bidr?reqformat=RTB_JSON",
"uri": "https://rtb.gamoshi.io/r/1707/bidr?bidder=prebid-server",
"body": {
"id": "test-request-id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "https://rtb.gamoshi.io/r/1707/bidr?reqformat=RTB_JSON",
"uri": "https://rtb.gamoshi.io/r/1707/bidr?bidder=prebid-server",
"body": {
"id": "test-request-id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "https://rtb.gamoshi.io/r/1707/bidr?reqformat=RTB_JSON",
"uri": "https://rtb.gamoshi.io/r/1707/bidr?bidder=prebid-server",
"body": {
"id": "test-request-id",
"device": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "https://rtb.gamoshi.io/r/1707/bidr?reqformat=RTB_JSON",
"uri": "https://rtb.gamoshi.io/r/1707/bidr?bidder=prebid-server",
"body": {
"id": "test-request-id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "https://rtb.gamoshi.io/r/1707/bidr?reqformat=RTB_JSON",
"uri": "https://rtb.gamoshi.io/r/1707/bidr?bidder=prebid-server",
"body": {
"id": "test-request-id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "https://rtb.gamoshi.io/r/1707/bidr?reqformat=RTB_JSON",
"uri": "https://rtb.gamoshi.io/r/1707/bidr?bidder=prebid-server",
"body": {
"id": "test-request-id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "https://rtb.gamoshi.io/r/1707/bidr?reqformat=RTB_JSON",
"uri": "https://rtb.gamoshi.io/r/1707/bidr?bidder=prebid-server",
"body": {
"id": "test-request-id",
"imp": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"httpCalls": [
{
"expectedRequest": {
"uri": "https://rtb.gamoshi.io/r/1707/bidr?reqformat=RTB_JSON",
"uri": "https://rtb.gamoshi.io/r/1707/bidr?bidder=prebid-server",
"body": {
"id": "test-request-id",
"imp": [
Expand Down
4 changes: 2 additions & 2 deletions adapters/gamoshi/usersync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

func TestGamoshiSyncer(t *testing.T) {
syncURL := "https://rtb.gamoshi.io/pix/1707/scm?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&rurl=localhost/setuid%3Fbidder%3Dgamoshi%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%5Bgusr%5D"
syncURL := "https://rtb.gamoshi.io/user_sync_prebid?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&rurl=https%3A%2F%2Flocalhost%2Fsetuid%3Fbidder%3Dgamoshi%26gdpr%3D%7B%7B.GDPR%7D%7D%26gdpr_consent%3D%7B%7B.GDPRConsent%7D%7D%26uid%3D%5Bgusr%5D"
syncURLTemplate := template.Must(
template.New("sync-template").Parse(syncURL),
)
Expand All @@ -18,7 +18,7 @@ func TestGamoshiSyncer(t *testing.T) {
syncInfo, err := syncer.GetUsersyncInfo(privacy.Policies{})

assert.NoError(t, err)
assert.Equal(t, "https://rtb.gamoshi.io/pix/1707/scm?gdpr=&consent=&rurl=localhost/setuid%3Fbidder%3Dgamoshi%26gdpr%3D%26gdpr_consent%3D%26uid%3D%5Bgusr%5D", syncInfo.URL)
assert.Equal(t, "https://rtb.gamoshi.io/user_sync_prebid?gdpr=&consent=&rurl=https%3A%2F%2Flocalhost%2Fsetuid%3Fbidder%3Dgamoshi%26gdpr%3D%7B%7B.GDPR%7D%7D%26gdpr_consent%3D%7B%7B.GDPRConsent%7D%7D%26uid%3D%5Bgusr%5D", syncInfo.URL)
assert.Equal(t, "redirect", syncInfo.Type)
assert.EqualValues(t, 644, syncer.GDPRVendorID())
assert.Equal(t, false, syncInfo.SupportCORS)
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ func (cfg *Configuration) setDerivedDefaults() {
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderEPlanning, "https://ads.us.e-planning.net/uspd/1/?du=https%3A%2F%2Fads.us.e-planning.net%2Fgetuid%2F1%2F5a1ad71d2d53a0f5%3F"+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Deplanning%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%24UID")
// openrtb_ext.BidderFacebook doesn't have a good default.
// openrtb_ext.BidderGamma doesn't have a good default.
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderGamoshi, "https://rtb.gamoshi.io/pix/0000/scm?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&rurl="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dgamoshi%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%5Bgusr%5D")
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderGamoshi, "https://rtb.gamoshi.io/user_sync_prebid?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&rurl="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dgamoshi%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%5Bgusr%5D")
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}}")
setDefaultUsersync(cfg.Adapters, openrtb_ext.BidderGumGum, "https://rtb.gumgum.com/usync/prbds2s?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&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}}&r="+url.QueryEscape(externalURL)+"%2Fsetuid%3Fbidder%3Dimprovedigital%26gdpr%3D{{.GDPR}}%26gdpr_consent%3D{{.GDPRConsent}}%26uid%3D%7BPUB_USER_ID%7D")
Expand Down

0 comments on commit 25a9e8d

Please sign in to comment.