Skip to content
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

Gamoshi Adapter: Update cookie sync #1146

Merged
merged 8 commits into from
Dec 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -490,7 +490,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