From d527e2f27a171620a308dba96b6120a1cc0f3283 Mon Sep 17 00:00:00 2001 From: Ioan-Alexandru Stef <126675343+ioan-alexandru-stef-smaato@users.noreply.github.com> Date: Thu, 25 May 2023 12:10:37 +0300 Subject: [PATCH] PREB-39 added support for imp.ext and added imp.ext.skadn to it (#2770) authored by @ioan-alexandru-stef-smaato --- adapters/smaato/smaato.go | 40 +- .../exemplary/multiple-impressions-skadn.json | 510 +++++++++++ .../exemplary/multiple-impressions.json | 4 +- .../exemplary/multiple-media-types-skadn.json | 487 +++++++++++ .../exemplary/multiple-media-types.json | 4 +- .../smaato/smaatotest/exemplary/native.json | 2 +- .../exemplary/simple-banner-app.json | 2 +- .../simple-banner-richMedia-app.json | 2 +- .../exemplary/simple-banner-richMedia.json | 2 +- .../exemplary/simple-banner-skadn.json | 283 ++++++ .../smaatotest/exemplary/simple-banner.json | 2 +- .../smaatotest/exemplary/video-app.json | 2 +- .../smaato/smaatotest/exemplary/video.json | 2 +- .../supplemental/adtype-header-response.json | 2 +- .../supplemental/bad-adm-response.json | 2 +- .../bad-adtype-header-response.json | 2 +- .../bad-expires-header-response.json | 2 +- .../bad-skadn-format-request.json | 59 ++ .../bad-status-code-response.json | 2 +- .../supplemental/banner-w-and-h.json | 2 +- .../supplemental/expires-header-response.json | 2 +- .../supplemental/no-bid-response.json | 2 +- .../supplemental/no-consent-info-request.json | 2 +- .../outdated-expires-header-response.json | 2 +- .../video/multiple-adpods-skadn.json | 813 ++++++++++++++++++ .../smaatotest/video/multiple-adpods.json | 4 +- .../smaatotest/video/single-adpod-skadn.json | 426 +++++++++ .../smaato/smaatotest/video/single-adpod.json | 2 +- .../videosupplemental/bad-adm-response.json | 2 +- .../bad-bid-ext-response.json | 2 +- .../bad-skadn-format-request.json | 89 ++ openrtb_ext/imp_smaato.go | 11 +- 32 files changed, 2739 insertions(+), 31 deletions(-) create mode 100644 adapters/smaato/smaatotest/exemplary/multiple-impressions-skadn.json create mode 100644 adapters/smaato/smaatotest/exemplary/multiple-media-types-skadn.json create mode 100644 adapters/smaato/smaatotest/exemplary/simple-banner-skadn.json create mode 100644 adapters/smaato/smaatotest/supplemental/bad-skadn-format-request.json create mode 100644 adapters/smaato/smaatotest/video/multiple-adpods-skadn.json create mode 100644 adapters/smaato/smaatotest/video/single-adpod-skadn.json create mode 100644 adapters/smaato/smaatotest/videosupplemental/bad-skadn-format-request.json diff --git a/adapters/smaato/smaato.go b/adapters/smaato/smaato.go index debf4669f39..e0892ef50fb 100644 --- a/adapters/smaato/smaato.go +++ b/adapters/smaato/smaato.go @@ -17,7 +17,7 @@ import ( "github.com/prebid/prebid-server/util/timeutil" ) -const clientVersion = "prebid_server_0.5" +const clientVersion = "prebid_server_0.6" type adMarkupType string @@ -464,6 +464,11 @@ func setImpForAdspace(imp *openrtb2.Imp) error { return &errortypes.BadInput{Message: "Missing adspaceId parameter."} } + impExt, err := makeImpExt(&imp.Ext) + if err != nil { + return err + } + if imp.Banner != nil { bannerCopy, err := setBannerDimension(imp.Banner) if err != nil { @@ -471,13 +476,13 @@ func setImpForAdspace(imp *openrtb2.Imp) error { } imp.Banner = bannerCopy imp.TagID = adSpaceID - imp.Ext = nil + imp.Ext = impExt return nil } if imp.Video != nil || imp.Native != nil { imp.TagID = adSpaceID - imp.Ext = nil + imp.Ext = impExt return nil } @@ -494,6 +499,11 @@ func setImpForAdBreak(imps []openrtb2.Imp) error { return &errortypes.BadInput{Message: "Missing adbreakId parameter."} } + impExt, err := makeImpExt(&imps[0].Ext) + if err != nil { + return err + } + for i := range imps { imps[i].TagID = adBreakID imps[i].Ext = nil @@ -506,9 +516,33 @@ func setImpForAdBreak(imps []openrtb2.Imp) error { imps[i].Video = &videoCopy } + imps[0].Ext = impExt + return nil } +func makeImpExt(impExtRaw *json.RawMessage) (json.RawMessage, error) { + var impExt openrtb_ext.ExtImpExtraDataSmaato + + if err := json.Unmarshal(*impExtRaw, &impExt); err != nil { + return nil, &errortypes.BadInput{Message: "Invalid imp.ext."} + } + + if impExtSkadnRaw := impExt.Skadn; impExtSkadnRaw != nil { + var impExtSkadn map[string]json.RawMessage + + if err := json.Unmarshal(impExtSkadnRaw, &impExtSkadn); err != nil { + return nil, &errortypes.BadInput{Message: "Invalid imp.ext.skadn."} + } + } + + if impExtJson, err := json.Marshal(impExt); string(impExtJson) != "{}" { + return impExtJson, err + } else { + return nil, nil + } +} + func setBannerDimension(banner *openrtb2.Banner) (*openrtb2.Banner, error) { if banner.W != nil && banner.H != nil { return banner, nil diff --git a/adapters/smaato/smaatotest/exemplary/multiple-impressions-skadn.json b/adapters/smaato/smaatotest/exemplary/multiple-impressions-skadn.json new file mode 100644 index 00000000000..cbc1f1e3440 --- /dev/null +++ b/adapters/smaato/smaatotest/exemplary/multiple-impressions-skadn.json @@ -0,0 +1,510 @@ +{ + "mockBidRequest": { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "site": { + "publisher": { + "id": "1100042525" + }, + "page": "http://localhost:3000/server.html?pbjs_debug=true&endpoint=http://localhost:3000/bidder", + "ext": { + "data": { + "keywords": "power tools", + "search": "drill", + "content": { + "userrating": 4 + } + } + } + }, + "imp": [ + { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "banner": { + "format": [ + { + "w": 320, + "h": 50 + }, + { + "w": 320, + "h": 250 + } + ] + }, + "bidfloor": 0.00123, + "ext": { + "bidder": { + "publisherId": "1100042525", + "adspaceId": "130563103" + }, + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047117", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + }, + { + "id": "postbid_iframe", + "video": { + "mimes": [ + "video/mp4", + "video/quicktime", + "video/3gpp", + "video/x-m4v" + ], + "minduration": 5, + "maxduration": 30, + "protocols": [ + 7 + ], + "w": 1024, + "h": 768, + "startdelay": 0, + "linearity": 1, + "skip": 1, + "skipmin": 5, + "api": [ + 7 + ], + "ext": { + "rewarded": 0 + } + }, + "bidfloor": 0.00456, + "ext": { + "bidder": { + "publisherId": "1100042526", + "adspaceId": "130563104" + }, + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047118", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + } + ], + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "user": { + "ext": { + "consent": "gdprConsentString", + "data": { + "keywords": "a,b", + "gender": "M", + "yob": 1984, + "geo": { + "country": "ca" + } + } + } + }, + "regs": { + "coppa": 1, + "ext": { + "gdpr": 1, + "us_privacy": "uspConsentString" + } + } + }, + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"] + }, + "uri": "https://prebid/bidder", + "body": { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "imp": [ + { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "tagid": "130563103", + "bidfloor": 0.00123, + "banner": { + "h": 50, + "w": 320, + "format": [ + { + "w": 320, + "h": 50 + }, + { + "w": 320, + "h": 250 + } + ] + }, + "ext": { + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047117", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + } + ], + "user": { + "ext": { + "consent": "gdprConsentString" + }, + "gender": "M", + "keywords": "a,b", + "yob": 1984 + }, + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "regs": { + "coppa": 1, + "ext": { + "gdpr": 1, + "us_privacy": "uspConsentString" + } + }, + "site": { + "publisher": { + "id": "1100042525" + }, + "page": "http://localhost:3000/server.html?pbjs_debug=true&endpoint=http://localhost:3000/bidder", + "keywords": "power tools" + }, + "ext": { + "client": "prebid_server_0.6" + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "5ebea288-f13a-4754-be6d-4ade66c68877", + "seatbid": [ + { + "seat": "CM6523", + "bid": [ + { + "adm": "{\"image\":{\"img\":{\"url\":\"//prebid-test.smaatolabs.net/img/320x50.jpg\",\"w\":350,\"h\":50,\"ctaurl\":\"//prebid-test.smaatolabs.net/track/ctaurl/1\"},\"impressiontrackers\":[\"//prebid-test.smaatolabs.net/track/imp/1\",\"//prebid-test.smaatolabs.net/track/imp/2\"],\"clicktrackers\":[\"//prebid-test.smaatolabs.net/track/click/1\",\"//prebid-test.smaatolabs.net/track/click/2\"]}}", + "adomain": [ + "smaato.com" + ], + "bidderName": "smaato", + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "iurl": "https://bidstalkcreatives.s3.amazonaws.com/1x1.png", + "nurl": "https://ets-eu-west-1.track.smaato.net/v1/view?sessionId=e4e17adb-9599-42b1-bb5f-a1f1b3bee572&adSourceId=6906aae8-7f74-4edd-9a4f-f49379a3cadd&originalRequestTime=1552310449698&expires=1552311350698&winurl=ama8JbpJVpFWxvEja5viE3cLXFu58qRI8dGUh23xtsOn3N2-5UU0IwkgNEmR82pI37fcMXejL5IWTNAoW6Cnsjf-Dxl_vx2dUqMrVEevX-Vdx2VVnf-D5f73gZhvi4t36iPL8Dsw4aACekoLvVOV7-eXDjz7GHy60QFqcwKf5g2AlKPOInyZ6vJg_fn4qA9argvCRgwVybXE9Ndm2W0v8La4uFYWpJBOUveDDUrSQfzal7RsYvLb_OyaMlPHdrd_bwA9qqZWuyJXd-L9lxr7RQ%3D%3D%7CMw3kt91KJR0Uy5L-oNztAg%3D%3D&dpid=4XVofb_lH-__hr2JNGhKfg%3D%3D%7Cr9ciCU1cx3zmHXihItKO0g%3D%3D", + "price": 0.01, + "w": 350, + "h": 50, + "ext": { + "skadn": { + "version": "2.2", + "network": "cdkw7geqsh.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + } + ] + } + ], + "bidid": "04db8629-179d-4bcd-acce-e54722969006", + "cur": "USD" + } + } + }, + { + "expectedRequest": { + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"] + }, + "uri": "https://prebid/bidder", + "body": { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "imp": [ + { + "id": "postbid_iframe", + "tagid": "130563104", + "bidfloor": 0.00456, + "video": { + "w": 1024, + "h": 768, + "ext": { + "rewarded": 0 + }, + "mimes": [ + "video/mp4", + "video/quicktime", + "video/3gpp", + "video/x-m4v" + ], + "minduration": 5, + "startdelay": 0, + "linearity": 1, + "maxduration": 30, + "skip": 1, + "protocols": [ + 7 + ], + "skipmin": 5, + "api": [ + 7 + ] + }, + "ext": { + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047118", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + } + ], + "user": { + "ext": { + "consent": "gdprConsentString" + }, + "gender": "M", + "keywords": "a,b", + "yob": 1984 + }, + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "regs": { + "coppa": 1, + "ext": { + "gdpr": 1, + "us_privacy": "uspConsentString" + } + }, + "site": { + "publisher": { + "id": "1100042526" + }, + "page": "http://localhost:3000/server.html?pbjs_debug=true&endpoint=http://localhost:3000/bidder", + "keywords": "power tools" + }, + "ext": { + "client": "prebid_server_0.6" + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "5ebea288-f13a-4754-be6d-4ade66c68877", + "seatbid": [ + { + "seat": "CM6523", + "bid": [ + { + "adm": "", + "adomain": [ + "smaato.com" + ], + "bidderName": "smaato", + "cid": "CM6524", + "crid": "CR69382", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "postbid_iframe", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "ext": { + "skadn": { + "version": "2.2", + "network": "cdkw7geqsh.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047118", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + } + ] + } + ], + "bidid": "04db8629-179d-4bcd-acce-e54722969006", + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "adm": "
\"\"\"\"
", + "adomain": [ + "smaato.com" + ], + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "iurl": "https://bidstalkcreatives.s3.amazonaws.com/1x1.png", + "nurl": "https://ets-eu-west-1.track.smaato.net/v1/view?sessionId=e4e17adb-9599-42b1-bb5f-a1f1b3bee572&adSourceId=6906aae8-7f74-4edd-9a4f-f49379a3cadd&originalRequestTime=1552310449698&expires=1552311350698&winurl=ama8JbpJVpFWxvEja5viE3cLXFu58qRI8dGUh23xtsOn3N2-5UU0IwkgNEmR82pI37fcMXejL5IWTNAoW6Cnsjf-Dxl_vx2dUqMrVEevX-Vdx2VVnf-D5f73gZhvi4t36iPL8Dsw4aACekoLvVOV7-eXDjz7GHy60QFqcwKf5g2AlKPOInyZ6vJg_fn4qA9argvCRgwVybXE9Ndm2W0v8La4uFYWpJBOUveDDUrSQfzal7RsYvLb_OyaMlPHdrd_bwA9qqZWuyJXd-L9lxr7RQ%3D%3D%7CMw3kt91KJR0Uy5L-oNztAg%3D%3D&dpid=4XVofb_lH-__hr2JNGhKfg%3D%3D%7Cr9ciCU1cx3zmHXihItKO0g%3D%3D", + "price": 0.01, + "w": 350, + "h": 50, + "exp": 300, + "ext": { + "skadn": { + "version": "2.2", + "network": "cdkw7geqsh.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + }, + "type": "banner" + } + ] + }, + { + "currency": "USD", + "bids": [ + { + "bid": { + "adm": "", + "adomain": [ + "smaato.com" + ], + "cid": "CM6524", + "crid": "CR69382", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "postbid_iframe", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "exp": 300, + "ext": { + "skadn": { + "version": "2.2", + "network": "cdkw7geqsh.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047118", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + }, + "type": "video" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/smaato/smaatotest/exemplary/multiple-impressions.json b/adapters/smaato/smaatotest/exemplary/multiple-impressions.json index 2901bcfc375..485636748aa 100644 --- a/adapters/smaato/smaatotest/exemplary/multiple-impressions.json +++ b/adapters/smaato/smaatotest/exemplary/multiple-impressions.json @@ -162,7 +162,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, @@ -268,7 +268,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/exemplary/multiple-media-types-skadn.json b/adapters/smaato/smaatotest/exemplary/multiple-media-types-skadn.json new file mode 100644 index 00000000000..5fc29f28df1 --- /dev/null +++ b/adapters/smaato/smaatotest/exemplary/multiple-media-types-skadn.json @@ -0,0 +1,487 @@ +{ + "mockBidRequest": { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "site": { + "publisher": { + "id": "1100042525" + }, + "page": "http://localhost:3000/server.html?pbjs_debug=true&endpoint=http://localhost:3000/bidder", + "ext": { + "data": { + "keywords": "power tools", + "search": "drill", + "content": { + "userrating": 4 + } + } + } + }, + "imp": [ + { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "banner": { + "format": [ + { + "w": 320, + "h": 50 + }, + { + "w": 320, + "h": 250 + } + ] + }, + "video": { + "mimes": [ + "video/mp4", + "video/quicktime", + "video/3gpp", + "video/x-m4v" + ], + "minduration": 5, + "maxduration": 30, + "protocols": [ + 7 + ], + "w": 1024, + "h": 768, + "startdelay": 0, + "linearity": 1, + "skip": 1, + "skipmin": 5, + "api": [ + 7 + ], + "ext": { + "rewarded": 0 + } + }, + "bidfloor": 0.00123, + "ext": { + "bidder": { + "publisherId": "1100042525", + "adspaceId": "130563103" + }, + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047117", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + } + ], + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "user": { + "ext": { + "consent": "gdprConsentString", + "data": { + "keywords": "a,b", + "gender": "M", + "yob": 1984, + "geo": { + "country": "ca" + } + } + } + }, + "regs": { + "coppa": 1, + "ext": { + "gdpr": 1, + "us_privacy": "uspConsentString" + } + } + }, + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"] + }, + "uri": "https://prebid/bidder", + "body": { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "imp": [ + { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "tagid": "130563103", + "bidfloor": 0.00123, + "banner": { + "h": 50, + "w": 320, + "format": [ + { + "w": 320, + "h": 50 + }, + { + "w": 320, + "h": 250 + } + ] + }, + "ext": { + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047117", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + } + ], + "user": { + "ext": { + "consent": "gdprConsentString" + }, + "gender": "M", + "keywords": "a,b", + "yob": 1984 + }, + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "regs": { + "coppa": 1, + "ext": { + "gdpr": 1, + "us_privacy": "uspConsentString" + } + }, + "site": { + "publisher": { + "id": "1100042525" + }, + "page": "http://localhost:3000/server.html?pbjs_debug=true&endpoint=http://localhost:3000/bidder", + "keywords": "power tools" + }, + "ext": { + "client": "prebid_server_0.6" + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "5ebea288-f13a-4754-be6d-4ade66c68877", + "seatbid": [ + { + "seat": "CM6523", + "bid": [ + { + "adm": "{\"image\":{\"img\":{\"url\":\"//prebid-test.smaatolabs.net/img/320x50.jpg\",\"w\":350,\"h\":50,\"ctaurl\":\"//prebid-test.smaatolabs.net/track/ctaurl/1\"},\"impressiontrackers\":[\"//prebid-test.smaatolabs.net/track/imp/1\",\"//prebid-test.smaatolabs.net/track/imp/2\"],\"clicktrackers\":[\"//prebid-test.smaatolabs.net/track/click/1\",\"//prebid-test.smaatolabs.net/track/click/2\"]}}", + "adomain": [ + "smaato.com" + ], + "bidderName": "smaato", + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "iurl": "https://bidstalkcreatives.s3.amazonaws.com/1x1.png", + "nurl": "https://ets-eu-west-1.track.smaato.net/v1/view?sessionId=e4e17adb-9599-42b1-bb5f-a1f1b3bee572&adSourceId=6906aae8-7f74-4edd-9a4f-f49379a3cadd&originalRequestTime=1552310449698&expires=1552311350698&winurl=ama8JbpJVpFWxvEja5viE3cLXFu58qRI8dGUh23xtsOn3N2-5UU0IwkgNEmR82pI37fcMXejL5IWTNAoW6Cnsjf-Dxl_vx2dUqMrVEevX-Vdx2VVnf-D5f73gZhvi4t36iPL8Dsw4aACekoLvVOV7-eXDjz7GHy60QFqcwKf5g2AlKPOInyZ6vJg_fn4qA9argvCRgwVybXE9Ndm2W0v8La4uFYWpJBOUveDDUrSQfzal7RsYvLb_OyaMlPHdrd_bwA9qqZWuyJXd-L9lxr7RQ%3D%3D%7CMw3kt91KJR0Uy5L-oNztAg%3D%3D&dpid=4XVofb_lH-__hr2JNGhKfg%3D%3D%7Cr9ciCU1cx3zmHXihItKO0g%3D%3D", + "price": 0.01, + "w": 350, + "h": 50, + "ext": { + "skadn": { + "version": "2.2", + "network": "cdkw7geqsh.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + } + ] + } + ], + "bidid": "04db8629-179d-4bcd-acce-e54722969006", + "cur": "USD" + } + } + }, + { + "expectedRequest": { + "headers": { + "Content-Type": ["application/json;charset=utf-8"], + "Accept": ["application/json"] + }, + "uri": "https://prebid/bidder", + "body": { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "imp": [ + { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "tagid": "130563103", + "bidfloor": 0.00123, + "video": { + "w": 1024, + "h": 768, + "ext": { + "rewarded": 0 + }, + "mimes": [ + "video/mp4", + "video/quicktime", + "video/3gpp", + "video/x-m4v" + ], + "minduration": 5, + "startdelay": 0, + "linearity": 1, + "maxduration": 30, + "skip": 1, + "protocols": [ + 7 + ], + "skipmin": 5, + "api": [ + 7 + ] + }, + "ext": { + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047117", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + } + ], + "user": { + "ext": { + "consent": "gdprConsentString" + }, + "gender": "M", + "keywords": "a,b", + "yob": 1984 + }, + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "regs": { + "coppa": 1, + "ext": { + "gdpr": 1, + "us_privacy": "uspConsentString" + } + }, + "site": { + "publisher": { + "id": "1100042525" + }, + "page": "http://localhost:3000/server.html?pbjs_debug=true&endpoint=http://localhost:3000/bidder", + "keywords": "power tools" + }, + "ext": { + "client": "prebid_server_0.6" + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "5ebea288-f13a-4754-be6d-4ade66c68877", + "seatbid": [ + { + "seat": "CM6523", + "bid": [ + { + "adm": "", + "adomain": [ + "smaato.com" + ], + "bidderName": "smaato", + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "ext": { + "skadn": { + "version": "2.2", + "network": "qyJfv329m4.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + } + ] + } + ], + "bidid": "04db8629-179d-4bcd-acce-e54722969006", + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "adm": "
\"\"\"\"
", + "adomain": [ + "smaato.com" + ], + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "iurl": "https://bidstalkcreatives.s3.amazonaws.com/1x1.png", + "nurl": "https://ets-eu-west-1.track.smaato.net/v1/view?sessionId=e4e17adb-9599-42b1-bb5f-a1f1b3bee572&adSourceId=6906aae8-7f74-4edd-9a4f-f49379a3cadd&originalRequestTime=1552310449698&expires=1552311350698&winurl=ama8JbpJVpFWxvEja5viE3cLXFu58qRI8dGUh23xtsOn3N2-5UU0IwkgNEmR82pI37fcMXejL5IWTNAoW6Cnsjf-Dxl_vx2dUqMrVEevX-Vdx2VVnf-D5f73gZhvi4t36iPL8Dsw4aACekoLvVOV7-eXDjz7GHy60QFqcwKf5g2AlKPOInyZ6vJg_fn4qA9argvCRgwVybXE9Ndm2W0v8La4uFYWpJBOUveDDUrSQfzal7RsYvLb_OyaMlPHdrd_bwA9qqZWuyJXd-L9lxr7RQ%3D%3D%7CMw3kt91KJR0Uy5L-oNztAg%3D%3D&dpid=4XVofb_lH-__hr2JNGhKfg%3D%3D%7Cr9ciCU1cx3zmHXihItKO0g%3D%3D", + "price": 0.01, + "w": 350, + "h": 50, + "exp": 300, + "ext": { + "skadn": { + "version": "2.2", + "network": "cdkw7geqsh.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + }, + "type": "banner" + } + ] + }, + { + "currency": "USD", + "bids": [ + { + "bid": { + "adm": "", + "adomain": [ + "smaato.com" + ], + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "exp": 300, + "ext": { + "skadn": { + "version": "2.2", + "network": "qyJfv329m4.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + }, + "type": "video" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/smaato/smaatotest/exemplary/multiple-media-types.json b/adapters/smaato/smaatotest/exemplary/multiple-media-types.json index f5f4af3378a..bbca7d2eb61 100644 --- a/adapters/smaato/smaatotest/exemplary/multiple-media-types.json +++ b/adapters/smaato/smaatotest/exemplary/multiple-media-types.json @@ -152,7 +152,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, @@ -258,7 +258,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/exemplary/native.json b/adapters/smaato/smaatotest/exemplary/native.json index 76534dd4f9d..00dfe9ec4af 100644 --- a/adapters/smaato/smaatotest/exemplary/native.json +++ b/adapters/smaato/smaatotest/exemplary/native.json @@ -102,7 +102,7 @@ } }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/exemplary/simple-banner-app.json b/adapters/smaato/smaatotest/exemplary/simple-banner-app.json index 4f38f26180e..22f9c9b94d4 100644 --- a/adapters/smaato/smaatotest/exemplary/simple-banner-app.json +++ b/adapters/smaato/smaatotest/exemplary/simple-banner-app.json @@ -160,7 +160,7 @@ "keywords": "keywords" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/exemplary/simple-banner-richMedia-app.json b/adapters/smaato/smaatotest/exemplary/simple-banner-richMedia-app.json index aac0198982d..3b054d43829 100644 --- a/adapters/smaato/smaatotest/exemplary/simple-banner-richMedia-app.json +++ b/adapters/smaato/smaatotest/exemplary/simple-banner-richMedia-app.json @@ -164,7 +164,7 @@ "keywords": "keywords" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/exemplary/simple-banner-richMedia.json b/adapters/smaato/smaatotest/exemplary/simple-banner-richMedia.json index 42f516c7f23..268fd0d43d8 100644 --- a/adapters/smaato/smaatotest/exemplary/simple-banner-richMedia.json +++ b/adapters/smaato/smaatotest/exemplary/simple-banner-richMedia.json @@ -129,7 +129,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/exemplary/simple-banner-skadn.json b/adapters/smaato/smaatotest/exemplary/simple-banner-skadn.json new file mode 100644 index 00000000000..33a7ef8e0a5 --- /dev/null +++ b/adapters/smaato/smaatotest/exemplary/simple-banner-skadn.json @@ -0,0 +1,283 @@ +{ + "mockBidRequest": { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "site": { + "publisher": { + "id": "1100042525" + }, + "page": "http://localhost:3000/server.html?pbjs_debug=true&endpoint=http://localhost:3000/bidder", + "ext": { + "data": { + "keywords": "power tools", + "search": "drill", + "content": { + "userrating": 4 + } + } + } + }, + "imp": [ + { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "banner": { + "format": [ + { + "w": 320, + "h": 50 + }, + { + "w": 320, + "h": 250 + } + ] + }, + "instl": 1, + "bidfloor": 0.00123, + "ext": { + "bidder": { + "publisherId": "1100042525", + "adspaceId": "130563103" + }, + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047117", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + } + ], + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "user": { + "ext": { + "consent": "gdprConsentString", + "data": { + "keywords": "a,b", + "gender": "M", + "yob": 1984, + "geo": { + "country": "ca" + } + } + } + }, + "regs": { + "coppa": 1, + "ext": { + "gdpr": 1, + "us_privacy": "uspConsentString", + "gpp": "gppString", + "gpp_sid": [ + 7 + ] + } + } + }, + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ] + }, + "uri": "https://prebid/bidder", + "body": { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "imp": [ + { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "tagid": "130563103", + "bidfloor": 0.00123, + "instl": 1, + "banner": { + "h": 50, + "w": 320, + "format": [ + { + "w": 320, + "h": 50 + }, + { + "w": 320, + "h": 250 + } + ] + }, + "ext": { + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047117", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + } + ], + "user": { + "ext": { + "consent": "gdprConsentString" + }, + "gender": "M", + "keywords": "a,b", + "yob": 1984 + }, + "device": { + "ua": "test-user-agent", + "ip": "123.123.123.123", + "language": "en", + "dnt": 0 + }, + "regs": { + "coppa": 1, + "ext": { + "gdpr": 1, + "us_privacy": "uspConsentString", + "gpp": "gppString", + "gpp_sid": [ + 7 + ] + } + }, + "site": { + "publisher": { + "id": "1100042525" + }, + "page": "http://localhost:3000/server.html?pbjs_debug=true&endpoint=http://localhost:3000/bidder", + "keywords": "power tools" + }, + "ext": { + "client": "prebid_server_0.6" + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "5ebea288-f13a-4754-be6d-4ade66c68877", + "seatbid": [ + { + "seat": "CM6523", + "bid": [ + { + "adm": "{\"image\":{\"img\":{\"url\":\"//prebid-test.smaatolabs.net/img/320x50.jpg\",\"w\":350,\"h\":50,\"ctaurl\":\"//prebid-test.smaatolabs.net/track/ctaurl/1\"},\"impressiontrackers\":[\"//prebid-test.smaatolabs.net/track/imp/1\",\"//prebid-test.smaatolabs.net/track/imp/2\"],\"clicktrackers\":[\"//prebid-test.smaatolabs.net/track/click/1\",\"//prebid-test.smaatolabs.net/track/click/2\"]}}", + "adomain": [ + "smaato.com" + ], + "bidderName": "smaato", + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "iurl": "https://bidstalkcreatives.s3.amazonaws.com/1x1.png", + "nurl": "https://ets-eu-west-1.track.smaato.net/v1/view?sessionId=e4e17adb-9599-42b1-bb5f-a1f1b3bee572&adSourceId=6906aae8-7f74-4edd-9a4f-f49379a3cadd&originalRequestTime=1552310449698&expires=1552311350698&winurl=ama8JbpJVpFWxvEja5viE3cLXFu58qRI8dGUh23xtsOn3N2-5UU0IwkgNEmR82pI37fcMXejL5IWTNAoW6Cnsjf-Dxl_vx2dUqMrVEevX-Vdx2VVnf-D5f73gZhvi4t36iPL8Dsw4aACekoLvVOV7-eXDjz7GHy60QFqcwKf5g2AlKPOInyZ6vJg_fn4qA9argvCRgwVybXE9Ndm2W0v8La4uFYWpJBOUveDDUrSQfzal7RsYvLb_OyaMlPHdrd_bwA9qqZWuyJXd-L9lxr7RQ%3D%3D%7CMw3kt91KJR0Uy5L-oNztAg%3D%3D&dpid=4XVofb_lH-__hr2JNGhKfg%3D%3D%7Cr9ciCU1cx3zmHXihItKO0g%3D%3D", + "price": 0.01, + "w": 350, + "h": 50, + "ext": { + "skadn": { + "version": "2.2", + "network": "cdkw7geqsh.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + } + ] + } + ], + "bidid": "04db8629-179d-4bcd-acce-e54722969006", + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "adm": "
\"\"\"\"
", + "adomain": [ + "smaato.com" + ], + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "iurl": "https://bidstalkcreatives.s3.amazonaws.com/1x1.png", + "nurl": "https://ets-eu-west-1.track.smaato.net/v1/view?sessionId=e4e17adb-9599-42b1-bb5f-a1f1b3bee572&adSourceId=6906aae8-7f74-4edd-9a4f-f49379a3cadd&originalRequestTime=1552310449698&expires=1552311350698&winurl=ama8JbpJVpFWxvEja5viE3cLXFu58qRI8dGUh23xtsOn3N2-5UU0IwkgNEmR82pI37fcMXejL5IWTNAoW6Cnsjf-Dxl_vx2dUqMrVEevX-Vdx2VVnf-D5f73gZhvi4t36iPL8Dsw4aACekoLvVOV7-eXDjz7GHy60QFqcwKf5g2AlKPOInyZ6vJg_fn4qA9argvCRgwVybXE9Ndm2W0v8La4uFYWpJBOUveDDUrSQfzal7RsYvLb_OyaMlPHdrd_bwA9qqZWuyJXd-L9lxr7RQ%3D%3D%7CMw3kt91KJR0Uy5L-oNztAg%3D%3D&dpid=4XVofb_lH-__hr2JNGhKfg%3D%3D%7Cr9ciCU1cx3zmHXihItKO0g%3D%3D", + "price": 0.01, + "w": 350, + "h": 50, + "exp": 300, + "ext": { + "skadn": { + "version": "2.2", + "network": "cdkw7geqsh.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/smaato/smaatotest/exemplary/simple-banner.json b/adapters/smaato/smaatotest/exemplary/simple-banner.json index f6f1f9d746f..0596c47346f 100644 --- a/adapters/smaato/smaatotest/exemplary/simple-banner.json +++ b/adapters/smaato/smaatotest/exemplary/simple-banner.json @@ -133,7 +133,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/exemplary/video-app.json b/adapters/smaato/smaatotest/exemplary/video-app.json index 33eb026c91e..79bd41ef5c4 100644 --- a/adapters/smaato/smaatotest/exemplary/video-app.json +++ b/adapters/smaato/smaatotest/exemplary/video-app.json @@ -165,7 +165,7 @@ "keywords": "keywords" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/exemplary/video.json b/adapters/smaato/smaatotest/exemplary/video.json index 17af4b367cf..42d56e60ac2 100644 --- a/adapters/smaato/smaatotest/exemplary/video.json +++ b/adapters/smaato/smaatotest/exemplary/video.json @@ -144,7 +144,7 @@ } }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/supplemental/adtype-header-response.json b/adapters/smaato/smaatotest/supplemental/adtype-header-response.json index d5bbd44061b..bebbc161e83 100644 --- a/adapters/smaato/smaatotest/supplemental/adtype-header-response.json +++ b/adapters/smaato/smaatotest/supplemental/adtype-header-response.json @@ -125,7 +125,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/supplemental/bad-adm-response.json b/adapters/smaato/smaatotest/supplemental/bad-adm-response.json index 0e898e8e18a..04a7248d8c6 100644 --- a/adapters/smaato/smaatotest/supplemental/bad-adm-response.json +++ b/adapters/smaato/smaatotest/supplemental/bad-adm-response.json @@ -125,7 +125,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/supplemental/bad-adtype-header-response.json b/adapters/smaato/smaatotest/supplemental/bad-adtype-header-response.json index 0b3e6dcd43d..679a34f78fb 100644 --- a/adapters/smaato/smaatotest/supplemental/bad-adtype-header-response.json +++ b/adapters/smaato/smaatotest/supplemental/bad-adtype-header-response.json @@ -125,7 +125,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/supplemental/bad-expires-header-response.json b/adapters/smaato/smaatotest/supplemental/bad-expires-header-response.json index 980dc3562b2..a990b92b732 100644 --- a/adapters/smaato/smaatotest/supplemental/bad-expires-header-response.json +++ b/adapters/smaato/smaatotest/supplemental/bad-expires-header-response.json @@ -125,7 +125,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/supplemental/bad-skadn-format-request.json b/adapters/smaato/smaatotest/supplemental/bad-skadn-format-request.json new file mode 100644 index 00000000000..b996d0cf95e --- /dev/null +++ b/adapters/smaato/smaatotest/supplemental/bad-skadn-format-request.json @@ -0,0 +1,59 @@ +{ + "mockBidRequest": { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "site": { + "publisher": { + "id": "1100042525" + }, + "page": "http://localhost:3000/server.html?pbjs_debug=true&endpoint=http://localhost:3000/bidder" + }, + "imp": [ + { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282C", + "banner": { + "format": [ + { + "w": 320, + "h": 50 + } + ] + }, + "ext": { + "bidder": { + "publisherId": "1100042525", + "adspaceId": "130563103" + }, + "skadn": [] + } + }, + { + "id": "1C86242D-9535-47D6-9576-7B1FE87F282D", + "banner": { + "format": [ + { + "w": 320, + "h": 50 + } + ] + }, + "ext": { + "bidder": { + "publisherId": "1100042525", + "adspaceId": "130563103" + }, + "skadn": "" + } + } + ] + }, + "expectedMakeRequestsErrors": [ + { + "value": "Invalid imp.ext.skadn.", + "comparison": "literal" + }, + { + "value": "Invalid imp.ext.skadn.", + "comparison": "literal" + } + ] +} \ No newline at end of file diff --git a/adapters/smaato/smaatotest/supplemental/bad-status-code-response.json b/adapters/smaato/smaatotest/supplemental/bad-status-code-response.json index 09c0d97e079..84b8fe9844b 100644 --- a/adapters/smaato/smaatotest/supplemental/bad-status-code-response.json +++ b/adapters/smaato/smaatotest/supplemental/bad-status-code-response.json @@ -125,7 +125,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/supplemental/banner-w-and-h.json b/adapters/smaato/smaatotest/supplemental/banner-w-and-h.json index 4f1ddca4033..ca1a029a140 100644 --- a/adapters/smaato/smaatotest/supplemental/banner-w-and-h.json +++ b/adapters/smaato/smaatotest/supplemental/banner-w-and-h.json @@ -107,7 +107,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/supplemental/expires-header-response.json b/adapters/smaato/smaatotest/supplemental/expires-header-response.json index 2002f8f3d66..86e1b101347 100644 --- a/adapters/smaato/smaatotest/supplemental/expires-header-response.json +++ b/adapters/smaato/smaatotest/supplemental/expires-header-response.json @@ -125,7 +125,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/supplemental/no-bid-response.json b/adapters/smaato/smaatotest/supplemental/no-bid-response.json index de282d6db68..76ad48a4c88 100644 --- a/adapters/smaato/smaatotest/supplemental/no-bid-response.json +++ b/adapters/smaato/smaatotest/supplemental/no-bid-response.json @@ -125,7 +125,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/supplemental/no-consent-info-request.json b/adapters/smaato/smaatotest/supplemental/no-consent-info-request.json index a2883b054fb..09b3a1fb1ca 100644 --- a/adapters/smaato/smaatotest/supplemental/no-consent-info-request.json +++ b/adapters/smaato/smaatotest/supplemental/no-consent-info-request.json @@ -72,7 +72,7 @@ } }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/supplemental/outdated-expires-header-response.json b/adapters/smaato/smaatotest/supplemental/outdated-expires-header-response.json index 138e0ac8ba4..2c983fe2119 100644 --- a/adapters/smaato/smaatotest/supplemental/outdated-expires-header-response.json +++ b/adapters/smaato/smaatotest/supplemental/outdated-expires-header-response.json @@ -125,7 +125,7 @@ "keywords": "power tools" }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/video/multiple-adpods-skadn.json b/adapters/smaato/smaatotest/video/multiple-adpods-skadn.json new file mode 100644 index 00000000000..fe9e9d4deae --- /dev/null +++ b/adapters/smaato/smaatotest/video/multiple-adpods-skadn.json @@ -0,0 +1,813 @@ +{ + "mockBidRequest": { + "id": "447a0a1d-389d-4730-a418-3777e95de7bd", + "imp": [ + { + "id": "1_1", + "video": { + "mimes": [ + "video/mp4", + "video/3gpp" + ], + "minduration": 5, + "maxduration": 30, + "protocols": [ + 7 + ], + "w": 1024, + "h": 768, + "startdelay": 0, + "linearity": 1, + "skip": 1, + "skipmin": 5, + "api": [ + 7 + ] + }, + "ext": { + "bidder": { + "publisherId": "1100042525", + "adbreakId": "400000001" + }, + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047117", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + }, + { + "id": "1_2", + "video": { + "mimes": [ + "video/mp4", + "video/3gpp" + ], + "minduration": 5, + "maxduration": 30, + "protocols": [ + 7 + ], + "w": 1024, + "h": 768, + "startdelay": 0, + "linearity": 1, + "skip": 1, + "skipmin": 5, + "api": [ + 7 + ] + }, + "ext": { + "bidder": { + "publisherId": "1100042525", + "adbreakId": "400000001" + }, + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047118", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + }, + { + "id": "2_1", + "video": { + "mimes": [ + "video/mp4", + "video/3gpp" + ], + "minduration": 5, + "maxduration": 30, + "protocols": [ + 7 + ], + "w": 1024, + "h": 768, + "startdelay": 0, + "linearity": 1, + "skip": 1, + "skipmin": 5, + "api": [ + 7 + ] + }, + "ext": { + "bidder": { + "publisherId": "1100042525", + "adbreakId": "400000001" + }, + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047119", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + }, + { + "id": "2_2", + "video": { + "mimes": [ + "video/mp4", + "video/3gpp" + ], + "minduration": 5, + "maxduration": 30, + "protocols": [ + 7 + ], + "w": 1024, + "h": 768, + "startdelay": 0, + "linearity": 1, + "skip": 1, + "skipmin": 5, + "api": [ + 7 + ] + }, + "ext": { + "bidder": { + "publisherId": "1100042525", + "adbreakId": "400000001" + }, + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047120", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + } + ], + "site": { + "publisher": { + "id": "1100042525" + }, + "content": { + "title": "a-title", + "season": "a-season", + "series": "a-series", + "episode": 1, + "len": 900, + "livestream": 1 + } + }, + "device": { + "ua": "test-user-agent" + }, + "user": { + "ext": { + "data": {} + } + } + }, + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ] + }, + "uri": "https://prebid/bidder", + "body": { + "id": "447a0a1d-389d-4730-a418-3777e95de7bd", + "imp": [ + { + "id": "1_1", + "tagid": "400000001", + "video": { + "w": 1024, + "h": 768, + "mimes": [ + "video/mp4", + "video/3gpp" + ], + "minduration": 5, + "startdelay": 0, + "linearity": 1, + "maxduration": 30, + "skip": 1, + "protocols": [ + 7 + ], + "skipmin": 5, + "api": [ + 7 + ], + "sequence": 1, + "ext": { + "context": "adpod" + } + }, + "ext": { + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047117", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + }, + { + "id": "1_2", + "tagid": "400000001", + "video": { + "w": 1024, + "h": 768, + "mimes": [ + "video/mp4", + "video/3gpp" + ], + "minduration": 5, + "startdelay": 0, + "linearity": 1, + "maxduration": 30, + "skip": 1, + "protocols": [ + 7 + ], + "skipmin": 5, + "api": [ + 7 + ], + "sequence": 2, + "ext": { + "context": "adpod" + } + } + } + ], + "user": { + "ext": { + } + }, + "device": { + "ua": "test-user-agent" + }, + "site": { + "publisher": { + "id": "1100042525" + }, + "content": { + "title": "a-title", + "season": "a-season", + "series": "a-series", + "episode": 1, + "len": 900, + "livestream": 1 + } + }, + "ext": { + "client": "prebid_server_0.6" + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "5ebea288-f13a-4754-be6d-4ade66c68877", + "seatbid": [ + { + "seat": "CM6523", + "bid": [ + { + "adm": "", + "adomain": [ + "smaato.com" + ], + "bidderName": "smaato", + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1_1", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "cat": ["IAB1"], + "ext": { + "duration": 5, + "skadn": { + "version": "2.2", + "network": "cdkw7geqsh.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + }, + { + "adm": "", + "adomain": [ + "smaato.com" + ], + "bidderName": "smaato", + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1_2", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "cat": ["IAB2"], + "ext": { + "duration": 30, + "skadn": { + "version": "2.2", + "network": "qyJfv329m4.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + } + ] + } + ], + "bidid": "04db8629-179d-4bcd-acce-e54722969006", + "cur": "USD" + } + } + }, + { + "expectedRequest": { + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ] + }, + "uri": "https://prebid/bidder", + "body": { + "id": "447a0a1d-389d-4730-a418-3777e95de7bd", + "imp": [ + { + "id": "2_1", + "tagid": "400000001", + "video": { + "w": 1024, + "h": 768, + "mimes": [ + "video/mp4", + "video/3gpp" + ], + "minduration": 5, + "startdelay": 0, + "linearity": 1, + "maxduration": 30, + "skip": 1, + "protocols": [ + 7 + ], + "skipmin": 5, + "api": [ + 7 + ], + "sequence": 1, + "ext": { + "context": "adpod" + } + }, + "ext": { + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047119", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + }, + { + "id": "2_2", + "tagid": "400000001", + "video": { + "w": 1024, + "h": 768, + "mimes": [ + "video/mp4", + "video/3gpp" + ], + "minduration": 5, + "startdelay": 0, + "linearity": 1, + "maxduration": 30, + "skip": 1, + "protocols": [ + 7 + ], + "skipmin": 5, + "api": [ + 7 + ], + "sequence": 2, + "ext": { + "context": "adpod" + } + } + } + ], + "user": { + "ext": { + } + }, + "device": { + "ua": "test-user-agent" + }, + "site": { + "publisher": { + "id": "1100042525" + }, + "content": { + "title": "a-title", + "season": "a-season", + "series": "a-series", + "episode": 1, + "len": 900, + "livestream": 1 + } + }, + "ext": { + "client": "prebid_server_0.6" + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "5ebea288-f13a-4754-be6d-4ade66c68877", + "seatbid": [ + { + "seat": "CM6523", + "bid": [ + { + "adm": "", + "adomain": [ + "smaato.com" + ], + "bidderName": "smaato", + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "2_1", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "cat": ["IAB1"], + "ext": { + "duration": 5, + "skadn": { + "version": "2.2", + "network": "cdkw7geqsh.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047119", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + }, + { + "adm": "", + "adomain": [ + "smaato.com" + ], + "bidderName": "smaato", + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "2_2", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "cat": ["IAB2"], + "ext": { + "duration": 30, + "skadn": { + "version": "2.2", + "network": "qyJfv329m4.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047119", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + } + ] + } + ], + "bidid": "04db8629-179d-4bcd-acce-e54722969006", + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "adm": "", + "adomain": [ + "smaato.com" + ], + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1_1", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "cat": ["IAB1"], + "ext": { + "duration": 5, + "skadn": { + "version": "2.2", + "network": "cdkw7geqsh.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + }, + "exp": 300 + }, + "type": "video" + + }, + { + "bid": { + "adm": "", + "adomain": [ + "smaato.com" + ], + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1_2", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "cat": ["IAB2"], + "ext": { + "duration": 30, + "skadn": { + "version": "2.2", + "network": "qyJfv329m4.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + }, + "exp": 300 + }, + "type": "video" + } + ] + }, + { + "currency": "USD", + "bids": [ + { + "bid": { + "adm": "", + "adomain": [ + "smaato.com" + ], + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "2_1", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "cat": ["IAB1"], + "ext": { + "duration": 5, + "skadn": { + "version": "2.2", + "network": "cdkw7geqsh.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047119", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + }, + "exp": 300 + }, + "type": "video" + }, + { + "bid": { + "adm": "", + "adomain": [ + "smaato.com" + ], + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "2_2", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "cat": ["IAB2"], + "ext": { + "duration": 30, + "skadn": { + "version": "2.2", + "network": "qyJfv329m4.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047119", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + }, + "exp": 300 + }, + "type": "video" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/smaato/smaatotest/video/multiple-adpods.json b/adapters/smaato/smaatotest/video/multiple-adpods.json index 1f098c92ff2..03641b866bf 100644 --- a/adapters/smaato/smaatotest/video/multiple-adpods.json +++ b/adapters/smaato/smaatotest/video/multiple-adpods.json @@ -234,7 +234,7 @@ } }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, @@ -386,7 +386,7 @@ } }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/video/single-adpod-skadn.json b/adapters/smaato/smaatotest/video/single-adpod-skadn.json new file mode 100644 index 00000000000..2f0f5129963 --- /dev/null +++ b/adapters/smaato/smaatotest/video/single-adpod-skadn.json @@ -0,0 +1,426 @@ +{ + "mockBidRequest": { + "id": "447a0a1d-389d-4730-a418-3777e95de7bd", + "imp": [ + { + "id": "1_1", + "video": { + "mimes": [ + "video/mp4", + "video/3gpp" + ], + "minduration": 5, + "maxduration": 30, + "protocols": [ + 7 + ], + "w": 1024, + "h": 768, + "startdelay": 0, + "linearity": 1, + "skip": 1, + "skipmin": 5, + "api": [ + 7 + ] + }, + "bidfloor": 0.00123, + "ext": { + "bidder": { + "publisherId": "1100042525", + "adbreakId": "400000001" + }, + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047117", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + }, + { + "id": "1_2", + "video": { + "mimes": [ + "video/mp4", + "video/3gpp" + ], + "minduration": 5, + "maxduration": 30, + "protocols": [ + 7 + ], + "w": 1024, + "h": 768, + "startdelay": 0, + "linearity": 1, + "skip": 1, + "skipmin": 5, + "api": [ + 7 + ] + }, + "bidfloor": 0.00123, + "ext": { + "bidder": { + "publisherId": "1100042525", + "adbreakId": "400000001" + }, + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047118", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + } + ], + "site": { + "publisher": { + "id": "1100042525" + }, + "content": { + "title": "a-title", + "season": "a-season", + "series": "a-series", + "episode": 1, + "len": 900, + "livestream": 1 + } + }, + "device": { + "ua": "test-user-agent" + }, + "user": { + "ext": { + "data": {} + } + } + }, + "httpCalls": [ + { + "expectedRequest": { + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ] + }, + "uri": "https://prebid/bidder", + "body": { + "id": "447a0a1d-389d-4730-a418-3777e95de7bd", + "imp": [ + { + "id": "1_1", + "tagid": "400000001", + "bidfloor": 0.00123, + "video": { + "w": 1024, + "h": 768, + "mimes": [ + "video/mp4", + "video/3gpp" + ], + "minduration": 5, + "startdelay": 0, + "linearity": 1, + "maxduration": 30, + "skip": 1, + "protocols": [ + 7 + ], + "skipmin": 5, + "api": [ + 7 + ], + "sequence": 1, + "ext": { + "context": "adpod" + } + }, + "ext": { + "skadn": { + "versions": ["2.0", "2.1", "2.2", "3.0", "4.0"], + "sourceapp": "880047117", + "productpage": 1, + "skadnetlist": { + "max": 306, + "excl": [2, 8, 10, 55], + "addl": [ + "cdkw7geqsh.skadnetwork", + "qyJfv329m4.skadnetwork" + ] + } + } + } + }, + { + "id": "1_2", + "tagid": "400000001", + "bidfloor": 0.00123, + "video": { + "w": 1024, + "h": 768, + "mimes": [ + "video/mp4", + "video/3gpp" + ], + "minduration": 5, + "startdelay": 0, + "linearity": 1, + "maxduration": 30, + "skip": 1, + "protocols": [ + 7 + ], + "skipmin": 5, + "api": [ + 7 + ], + "sequence": 2, + "ext": { + "context": "adpod" + } + } + } + ], + "user": { + "ext": { + } + }, + "device": { + "ua": "test-user-agent" + }, + "site": { + "publisher": { + "id": "1100042525" + }, + "content": { + "title": "a-title", + "season": "a-season", + "series": "a-series", + "episode": 1, + "len": 900, + "livestream": 1 + } + }, + "ext": { + "client": "prebid_server_0.6" + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "id": "5ebea288-f13a-4754-be6d-4ade66c68877", + "seatbid": [ + { + "seat": "CM6523", + "bid": [ + { + "adm": "", + "adomain": [ + "smaato.com" + ], + "bidderName": "smaato", + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1_1", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "cat": ["IAB1"], + "ext": { + "duration": 5, + "skadn": { + "version": "2.2", + "network": "cdkw7geqsh.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + }, + { + "adm": "", + "adomain": [ + "smaato.com" + ], + "bidderName": "smaato", + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1_2", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "cat": ["IAB2"], + "ext": { + "duration": 30, + "skadn": { + "version": "2.2", + "network": "qyJfv329m4.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + } + } + ] + } + ], + "bidid": "04db8629-179d-4bcd-acce-e54722969006", + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "adm": "", + "adomain": [ + "smaato.com" + ], + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1_1", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "cat": ["IAB1"], + "ext": { + "duration": 5, + "skadn": { + "version": "2.2", + "network": "cdkw7geqsh.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + }, + "exp": 300 + }, + "type": "video" + }, + { + "bid": { + "adm": "", + "adomain": [ + "smaato.com" + ], + "cid": "CM6523", + "crid": "CR69381", + "id": "6906aae8-7f74-4edd-9a4f-f49379a3cadd", + "impid": "1_2", + "iurl": "https://iurl", + "nurl": "https://nurl", + "price": 0.01, + "w": 1024, + "h": 768, + "cat": ["IAB2"], + "ext": { + "duration": 30, + "skadn": { + "version": "2.2", + "network": "qyJfv329m4.skadnetwork", + "campaign": "45", + "itunesitem": "123456789", + "sourceapp": "880047117", + "productpageid": "45812c9b-c296-43d3-c6a0-c5a02f74bf6e", + "fidelities": [ + { + "fidelity": 0, + "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg==", + "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7", + "timestamp": "1594406341" + }, + { + "fidelity": 1, + "signature": "GRlMDktMmE5Zi00ZGMzLWE0ZDEtNTQ0YzQwMmU5MDk1IiwKICAgICAgICAgICAgICAgICAgInRpbWVzdGTk0NDA2MzQyIg==", + "nonce": "e650de09-2a9f-4dc3-a4d1-544c402e9095", + "timestamp": "1594406342" + } + ] + } + }, + "exp": 300 + }, + "type": "video" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/smaato/smaatotest/video/single-adpod.json b/adapters/smaato/smaatotest/video/single-adpod.json index 404e3551556..3029782db5a 100644 --- a/adapters/smaato/smaatotest/video/single-adpod.json +++ b/adapters/smaato/smaatotest/video/single-adpod.json @@ -180,7 +180,7 @@ } }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/videosupplemental/bad-adm-response.json b/adapters/smaato/smaatotest/videosupplemental/bad-adm-response.json index 22e40ba1c4e..00d715082b5 100644 --- a/adapters/smaato/smaatotest/videosupplemental/bad-adm-response.json +++ b/adapters/smaato/smaatotest/videosupplemental/bad-adm-response.json @@ -176,7 +176,7 @@ } }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/videosupplemental/bad-bid-ext-response.json b/adapters/smaato/smaatotest/videosupplemental/bad-bid-ext-response.json index ca6cc068066..f3707dead17 100644 --- a/adapters/smaato/smaatotest/videosupplemental/bad-bid-ext-response.json +++ b/adapters/smaato/smaatotest/videosupplemental/bad-bid-ext-response.json @@ -176,7 +176,7 @@ } }, "ext": { - "client": "prebid_server_0.5" + "client": "prebid_server_0.6" } } }, diff --git a/adapters/smaato/smaatotest/videosupplemental/bad-skadn-format-request.json b/adapters/smaato/smaatotest/videosupplemental/bad-skadn-format-request.json new file mode 100644 index 00000000000..35d33cf7fee --- /dev/null +++ b/adapters/smaato/smaatotest/videosupplemental/bad-skadn-format-request.json @@ -0,0 +1,89 @@ +{ + "mockBidRequest": { + "id": "447a0a1d-389d-4730-a418-3777e95de7bd", + "imp": [ + { + "id": "1_1", + "video": { + "mimes": [ + "video/mp4", + "video/3gpp" + ], + "minduration": 5, + "maxduration": 30, + "protocols": [ + 7 + ], + "w": 1024, + "h": 768, + "startdelay": 0, + "linearity": 1, + "skip": 1, + "skipmin": 5, + "api": [ + 7 + ] + }, + "bidfloor": 0.00123, + "ext": { + "bidder": { + "publisherId": "1100042525", + "adbreakId": "400000001" + }, + "skadn": [] + } + }, + { + "id": "1_2", + "video": { + "mimes": [ + "video/mp4", + "video/3gpp" + ], + "minduration": 5, + "maxduration": 30, + "protocols": [ + 7 + ], + "w": 1024, + "h": 768, + "startdelay": 0, + "linearity": 1, + "skip": 1, + "skipmin": 5, + "api": [ + 7 + ] + }, + "bidfloor": 0.00123 + } + ], + "site": { + "publisher": { + "id": "1100042525" + }, + "content": { + "title": "a-title", + "season": "a-season", + "series": "a-series", + "episode": 1, + "len": 900, + "livestream": 1 + } + }, + "device": { + "ua": "test-user-agent" + }, + "user": { + "ext": { + "data": {} + } + } + }, + "expectedMakeRequestsErrors": [ + { + "value": "Invalid imp.ext.skadn.", + "comparison": "literal" + } + ] +} \ No newline at end of file diff --git a/openrtb_ext/imp_smaato.go b/openrtb_ext/imp_smaato.go index bb92b318416..fb326100f8b 100644 --- a/openrtb_ext/imp_smaato.go +++ b/openrtb_ext/imp_smaato.go @@ -1,12 +1,19 @@ package openrtb_ext +import "encoding/json" + // ExtImpSmaato defines the contract for bidrequest.imp[i].ext.prebid.bidder.smaato // PublisherId and AdSpaceId are mandatory parameters for non adpod (long-form video) requests, others are optional parameters // PublisherId and AdBreakId are mandatory parameters for adpod (long-form video) requests, others are optional parameters -// AdSpaceId is identifier for specific ad placement or ad tag -// AdBreakId is identifier for specific ad placement or ad tag +// AdSpaceId is the identifier for specific ad placement or ad tag +// AdBreakId is the identifier for specific ad placement or ad tag type ExtImpSmaato struct { PublisherID string `json:"publisherId"` AdSpaceID string `json:"adspaceId"` AdBreakID string `json:"adbreakId"` } + +// ExtImpExtraDataSmaato defines extra properties from imp[i].ext object +type ExtImpExtraDataSmaato struct { + Skadn json.RawMessage `json:"skadn,omitempty"` +}