-
Notifications
You must be signed in to change notification settings - Fork 760
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
MgidX: add optional region param #3396
Conversation
# Conflicts: # exchange/adapter_map.go # openrtb_ext/bidders.go
# Conflicts: # adapters/mgid/mgid.go # config/config.go # usersync/usersyncers/syncer.go
Get last prebid-server changes
Add mgidX
Code coverage summaryNote:
mgidXRefer here for heat map coverage report
|
if params.Region == "eu" { | ||
endpointParams = macros.EndpointTemplateParams{Host: "eu"} | ||
} else { | ||
endpointParams = macros.EndpointTemplateParams{Host: "us-east-x"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implementation will prevent a host company from sending all traffic from their EU data centers to yours, as the control is entirely placed on the publisher. Would you consider falling back to a host specified user endpoint instead of hardcoding US East?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, a host could still override the endpoint to include the eu subdomain and omit the macro. I think that's fine, if you could please make that clear through documentation.
endpoint: "https://us-east-x.mgid.com/pserver" | ||
endpoint: "https://{{.Host}}.mgid.com/pserver" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should update json test to include endpoint from bidder-info
prebid-server/adapters/mgidX/mgidX_test.go
Lines 12 to 20 in ec729e6
bidder, buildErr := Builder(openrtb_ext.BidderEmtv, config.Adapter{ | |
Endpoint: "http://example.com/pserver"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) | |
if buildErr != nil { | |
t.Fatalf("Builder returned unexpected error %v", buildErr) | |
} | |
adapterstest.RunJSONBidderTest(t, "mgidXtest", bidder) | |
} |
var mgidXExt *openrtb_ext.ImpExtMgidX | ||
mgidXExt, err := a.getImpressionExt(&(request.Imp[0])) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
url, err := a.buildEndpointURL(mgidXExt) | ||
if err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only request.Imp[0]
is considered to prepare mgidXExt
@xmgiddev could you clearify whether adapter supports multi-imps request. If not then should specify this in bidder docs. If multi-imps are supported then should mention that only request.Imp[0]
will be considered to prepare mgidXExt
@xmgiddev Could you please take a look at the comments above? |
@xmgiddev requesting to take a look at PR comments |
closing this PR due to inactivity. @xmgiddev, could reopen this PR when comments are addressed or new changes are pushed |
doc - prebid/prebid.github.io#4932
continuation - #3220