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

Add dynamic bidfloor parameter to Smart Adserver Adapter #1194

Merged
merged 12 commits into from
May 17, 2017
1 change: 1 addition & 0 deletions src/adapters/smartadserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ var SmartAdServer = function SmartAdServer() {
"pgid": bid.params.pageId,
"fmtid": bid.params.formatId,
"ccy": bid.params.currency || "USD",
"bidfloor": bid.params.bidfloor || 0.0,
"tgt": encodeURIComponent(bid.params.target || ''),
"tag": bid.placementCode,
"sizes": bid.sizes.map(size => size[0] + "x" + size[1]).join(","),
Expand Down
4 changes: 3 additions & 1 deletion test/spec/adapters/smartadserver_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ describe("smartadserver adapter tests", function () {
pageId: "5678",
formatId: "90",
target: "test=prebid",
currency: "EUR"
currency: "EUR",
bidfloor: 0.420
},
requestId: "efgh5678",
placementCode: "sas_42"
Expand Down Expand Up @@ -78,6 +79,7 @@ describe("smartadserver adapter tests", function () {
expect(parsedBidUrlQueryString).to.have.property("fmtid").and.to.equal("90");
expect(parsedBidUrlQueryString).to.have.property("tgt").and.to.equal("test=prebid");
expect(parsedBidUrlQueryString).to.have.property("ccy").and.to.equal("EUR");
expect(parsedBidUrlQueryString).to.have.property("bidfloor").and.to.equal("0.42");
expect(parsedBidUrlQueryString).to.have.property("tag").and.to.equal("sas_42");
expect(parsedBidUrlQueryString).to.have.property("sizes").and.to.equal("300x250,300x200");
expect(parsedBidUrlQueryString).to.have.property("async").and.to.equal("1");
Expand Down