From f8a96e294e1898cee1b2df5f96d4d61748f39c32 Mon Sep 17 00:00:00 2001 From: Hasan Kanjee Date: Sat, 4 Nov 2023 22:42:02 -0400 Subject: [PATCH] add additional tests and minor code fixes --- adapters/flipp/flipp.go | 34 +++- adapters/flipp/flipp_test.go | 37 +--- ...ple-banner-native-param-transmit-eids.json | 181 ++++++++++++++++++ ...simple-banner-native-param-user-coppa.json | 177 +++++++++++++++++ .../simple-banner-native-param-user-gdpr.json | 177 +++++++++++++++++ .../simple-banner-native-param-user.json | 5 + 6 files changed, 573 insertions(+), 38 deletions(-) create mode 100644 adapters/flipp/flipptest/exemplary/simple-banner-native-param-transmit-eids.json create mode 100644 adapters/flipp/flipptest/exemplary/simple-banner-native-param-user-coppa.json create mode 100644 adapters/flipp/flipptest/exemplary/simple-banner-native-param-user-gdpr.json diff --git a/adapters/flipp/flipp.go b/adapters/flipp/flipp.go index 32408371390..ba106f30f09 100644 --- a/adapters/flipp/flipp.go +++ b/adapters/flipp/flipp.go @@ -21,8 +21,11 @@ const ( inlineDivName = "inline" flippBidder = "flipp" defaultCurrency = "USD" + fakeUuid = "30470a14-2949-4110-abce-b62d57304ad5" ) +var uuidGenerator UUIDGenerator + var ( count int64 = 1 adTypes = []int64{4309, 641} @@ -33,6 +36,30 @@ type adapter struct { endpoint string } +type UUIDGenerator interface { + Generate() (uuid.UUID, error) +} + +type RealUUIDGenerator struct{} + +func (g *RealUUIDGenerator) Generate() (uuid.UUID, error) { + return uuid.NewV4() +} + +type FakeUUIDGenerator struct{} + +func (g *FakeUUIDGenerator) Generate() (uuid.UUID, error) { + return uuid.FromStringOrNil(fakeUuid), nil +} + +func NewUUIDGenerator(isTest bool) { + if isTest { + uuidGenerator = &FakeUUIDGenerator{} + } else { + uuidGenerator = &RealUUIDGenerator{} + } +} + // Builder builds a new instance of the Flipp adapter for the given bidder with the given config. func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) { bidder := &adapter{ @@ -127,7 +154,8 @@ func (a *adapter) processImp(request *openrtb2.BidRequest, imp openrtb2.Imp) (*a } else if flippExtParams.UserKey != "" && paramsUserKeyPermitted(request) { userKey = flippExtParams.UserKey } else { - uid, err := uuid.NewV4() + + uid, err := uuidGenerator.Generate() if err != nil { return nil, fmt.Errorf("unable to generate user uuid. %v", err) } @@ -247,10 +275,10 @@ func paramsUserKeyPermitted(request *openrtb2.BidRequest) bool { if request.User != nil && request.User.Consent != "" { tcModel, err := iabtcfv2.Decode(request.User.Consent) if err != nil { - fmt.Printf("%v", err) return true } - if !tcModel.IsPurposeAllowed(4) { + _, tcf4InScope := tcModel.CoreString.PurposesConsent[4] + if tcf4InScope && !tcModel.IsPurposeAllowed(4) { return false } } diff --git a/adapters/flipp/flipp_test.go b/adapters/flipp/flipp_test.go index c714086b6ef..06e17687bc1 100644 --- a/adapters/flipp/flipp_test.go +++ b/adapters/flipp/flipp_test.go @@ -3,10 +3,7 @@ package flipp import ( "encoding/json" "testing" - "time" - "github.com/SirDataFR/iabtcfv2" - "github.com/aws/smithy-go/ptr" "github.com/prebid/openrtb/v19/openrtb2" "github.com/prebid/prebid-server/v2/adapters/adapterstest" "github.com/prebid/prebid-server/v2/config" @@ -15,6 +12,7 @@ import ( ) func TestJsonSamples(t *testing.T) { + NewUUIDGenerator(true) bidder, buildErr := Builder(openrtb_ext.BidderFlipp, config.Adapter{ Endpoint: "http://example.com/pserver"}, config.Server{ExternalUrl: "http://hosturl.com", GvlID: 1, DataCenter: "2"}) @@ -41,44 +39,13 @@ func TestParamsUserKeyPermitted(t *testing.T) { t.Run("The Global Privacy Control is set", func(t *testing.T) { request := &openrtb2.BidRequest{ Regs: &openrtb2.Regs{ - GDPR: ptr.Int8(1), + GDPR: openrtb2.Int8Ptr(1), }, } result := paramsUserKeyPermitted(request) assert.New(t) assert.False(t, result, "param user key not permitted because Global Privacy Control is set") }) - t.Run("TCF purpose 4 is in scope and doesn't have consent", func(t *testing.T) { - tcData := &iabtcfv2.TCData{ - CoreString: &iabtcfv2.CoreString{ - PublisherCC: "test", - Version: 2, - Created: time.Now(), - LastUpdated: time.Now(), - CmpId: 92, - CmpVersion: 1, - ConsentScreen: 1, - ConsentLanguage: "EN", - VendorListVersion: 32, - TcfPolicyVersion: 2, - PurposesConsent: map[int]bool{ - 1: true, - 2: true, - 3: true, - }, - }, - } - segmentValue := tcData.CoreString.Encode() - user := &openrtb2.User{ - Consent: segmentValue, - } - request := &openrtb2.BidRequest{ - User: user, - } - result := paramsUserKeyPermitted(request) - assert.New(t) - assert.False(t, result, "param user key not permitted because TCF purpose 4 is in scope and doesn't have consent") - }) t.Run("The Prebid transmitEids activity is disallowed", func(t *testing.T) { extData := struct { TransmitEids bool `json:"transmitEids"` diff --git a/adapters/flipp/flipptest/exemplary/simple-banner-native-param-transmit-eids.json b/adapters/flipp/flipptest/exemplary/simple-banner-native-param-transmit-eids.json new file mode 100644 index 00000000000..77ba527b5cf --- /dev/null +++ b/adapters/flipp/flipptest/exemplary/simple-banner-native-param-transmit-eids.json @@ -0,0 +1,181 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "test": 1, + "device": { + "ip": "123.123.123.123" + }, + "site": { + "id": "1243066", + "page": "http://www.example.com/test?flipp-content-code=publisher-test" + }, + "user": { + }, + "ext": { + "transmitEids": false + }, + "regs": { + "coppa": 0, + "gdpr": 0 + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 1800 + } + ] + }, + "ext": { + "bidder": { + "publisherNameIdentifier": "wishabi-test-publisher", + "creativeType": "NativeX", + "siteId": 1243066, + "zoneIds": [285431], + "options": { + "startCompact": true + }, + "userKey": "abc123" + } + } + } + + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://example.com/pserver", + "body": { + "ip":"123.123.123.123", + "keywords":[ + "" + ], + "placements":[ + { + "adTypes":[ + 4309, + 641 + ], + "count":1, + "divName":"inline", + "prebid":{ + "creativeType":"NativeX", + "height":1800, + "publisherNameIdentifier":"wishabi-test-publisher", + "requestId":"test-imp-id", + "width":300 + }, + "properties":{ + "contentCode":"publisher-test" + }, + "siteId":1243066, + "zoneIds":[ + 285431 + ], + "options": { + "startCompact": true + } + } + ], + "url":"http://www.example.com/test?flipp-content-code=publisher-test", + "user":{ + "key":"30470a14-2949-4110-abce-b62d57304ad5" + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "decisions": { + "inline": [ + { + "adId": 183599115, + "advertiserId": 1988027, + "campaignId": 63285392, + "clickUrl": "https://e-11090.adzerk.net/r?e=eyJ2IjoiMS4xMSIsImF2IjoxOTg4MDI3LCJhdCI6NDMwOSwiYnQiOjAsImNtIjo2MzI4NTM5MiwiY2giOjU4MDgxLCJjayI6e30sImNyIjo4MTMyNTY5MCwiZGkiOiJiOTg3MGNkYTA5MTU0NDlmOTkwZGNkZTNmNjYyNGNhMyIsImRqIjowLCJpaSI6IjJmNjYwMjMyODBmYjQ4NTRiYTY0YzFlYzA1ZDU5MTNiIiwiZG0iOjMsImZjIjoxODM1OTkxMTUsImZsIjoxNzU0MjE3OTUsImlwIjoiMTQyLjE4MS41OC41MiIsIm53IjoxMDkyMiwicGMiOjAsIm9wIjowLCJlYyI6MCwiZ20iOjAsImVwIjpudWxsLCJwciI6MjMyNjk5LCJydCI6MywicnMiOjUwMCwic2EiOiIzNCIsInNiIjoiaS0wNDZjMWNlNWRjYmExMTVjNSIsInNwIjozNzIzMDU1LCJzdCI6MTI0MzA2NiwidWsiOiJkOTU1N2Q2NS1kNWI5LTQyOTItYjg2My0xNGEyOTcyNTk3ZjQiLCJ6biI6Mjg1NDMxLCJ0cyI6MTY4MDU1NTc4MzkyMiwicG4iOiJpbmxpbmUiLCJnYyI6dHJ1ZSwiZ0MiOnRydWUsImdzIjoibm9uZSIsInR6IjoiQW1lcmljYS9OZXdfWW9yayIsInVyIjoiaHR0cDovL3d3dy5mbGlwcC5jb20ifQ&s=Mnss8P1kc37Eftik5RJvLJb4S9Y", + "contents": [ + { + "data": { + "customData": { + "campaignConfigUrl": "https://campaign-config.flipp.com/dist-campaign-admin/215", + "campaignNameIdentifier": "US Grocery Demo (Kroger)" + }, + "height": 1800, + "width": 300 + }, + "type": "raw" + } + ], + "creativeId": 81325690, + "flightId": 175421795, + "height": 1800, + "impressionUrl": "https://e-11090.adzerk.net/i.gif?e=eyJ2IjoiMS4xMSIsImF2IjoxOTg4MDI3LCJhdCI6NDMwOSwiYnQiOjAsImNtIjo2MzI4NTM5MiwiY2giOjU4MDgxLCJjayI6e30sImNyIjo4MTMyNTY5MCwiZGkiOiJiOTg3MGNkYTA5MTU0NDlmOTkwZGNkZTNmNjYyNGNhMyIsImRqIjowLCJpaSI6IjJmNjYwMjMyODBmYjQ4NTRiYTY0YzFlYzA1ZDU5MTNiIiwiZG0iOjMsImZjIjoxODM1OTkxMTUsImZsIjoxNzU0MjE3OTUsImlwIjoiMTQyLjE4MS41OC41MiIsIm53IjoxMDkyMiwicGMiOjAsIm9wIjowLCJlYyI6MCwiZ20iOjAsImVwIjpudWxsLCJwciI6MjMyNjk5LCJydCI6MywicnMiOjUwMCwic2EiOiIzNCIsInNiIjoiaS0wNDZjMWNlNWRjYmExMTVjNSIsInNwIjozNzIzMDU1LCJzdCI6MTI0MzA2NiwidWsiOiJkOTU1N2Q2NS1kNWI5LTQyOTItYjg2My0xNGEyOTcyNTk3ZjQiLCJ6biI6Mjg1NDMxLCJ0cyI6MTY4MDU1NTc4MzkyMywicG4iOiJpbmxpbmUiLCJnYyI6dHJ1ZSwiZ0MiOnRydWUsImdzIjoibm9uZSIsInR6IjoiQW1lcmljYS9OZXdfWW9yayIsImJhIjoxLCJmcSI6MH0&s=Qce4_IohtESeNA_sB71Qjb4TouY", + "prebid": { + "cpm": 12.34, + "creative":"creativeContent", + "creativeType": "NativeX", + "requestId": "test-imp-id" + }, + "priorityId": 232699, + "storefront": { + "campaignConfig": { + "fallbackImageUrl": "https://f.wishabi.net/arbitrary_files/115856/1666018811/115856_Featured Local Savings - Flipp Fallback - US (1).png", + "fallbackLinkUrl": "https://flipp.com/flyers/", + "tags": { + "advertiser": { + "engagement": "https://f.wishabi.net/creative/happyfruits/_itemlevelv2/apple.png?cb=[[random]]" + } + } + }, + "flyer_id": 5554080, + "flyer_run_id": 873256, + "flyer_type_id": 2826, + "is_fallback": true, + "merchant": "Kroger", + "merchant_id": 2778, + "name": "Weekly Ad", + "storefront_logo_url": "https://images.wishabi.net/merchants/qX1/BGIzc9sFcA==/RackMultipart20210421-1-e3k5rx.jpeg", + "storefront_payload_url": "https://cdn-gateflipp.flippback.com/storefront-payload/v2/873256/5554080/ff14f675705934507c269b5750e124a323bc9bf60e8a6f210f422f4528b233ff?merchant_id=2778", + "valid_from": "2023-03-29 04:00:00 +0000 UTC", + "valid_to": "2023-04-05 03:59:59 +0000 UTC" + }, + "width": 300 + } + ] + }, + "location": { + "accuracy_radius": 5, + "city": "Toronto", + "country": "CA", + "ip": "123.123.123.123", + "postal_code": "M4S", + "region": "ON", + "region_name": "Ontario" + } + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "183599115", + "impid": "test-imp-id", + "price": 12.34, + "adm": "creativeContent", + "crid": "81325690", + "w": 300 + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/flipp/flipptest/exemplary/simple-banner-native-param-user-coppa.json b/adapters/flipp/flipptest/exemplary/simple-banner-native-param-user-coppa.json new file mode 100644 index 00000000000..f61f6d9d710 --- /dev/null +++ b/adapters/flipp/flipptest/exemplary/simple-banner-native-param-user-coppa.json @@ -0,0 +1,177 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "test": 1, + "device": { + "ip": "123.123.123.123" + }, + "site": { + "id": "1243066", + "page": "http://www.example.com/test?flipp-content-code=publisher-test" + }, + "regs": { + "coppa": 1 + }, + "user": { + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 1800 + } + ] + }, + "ext": { + "bidder": { + "publisherNameIdentifier": "wishabi-test-publisher", + "creativeType": "NativeX", + "siteId": 1243066, + "zoneIds": [285431], + "options": { + "startCompact": true + }, + "userKey": "abc123" + } + } + } + + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://example.com/pserver", + "body": { + "ip":"123.123.123.123", + "keywords":[ + "" + ], + "placements":[ + { + "adTypes":[ + 4309, + 641 + ], + "count":1, + "divName":"inline", + "prebid":{ + "creativeType":"NativeX", + "height":1800, + "publisherNameIdentifier":"wishabi-test-publisher", + "requestId":"test-imp-id", + "width":300 + }, + "properties":{ + "contentCode":"publisher-test" + }, + "siteId":1243066, + "zoneIds":[ + 285431 + ], + "options": { + "startCompact": true + } + } + ], + "url":"http://www.example.com/test?flipp-content-code=publisher-test", + "user":{ + "key":"30470a14-2949-4110-abce-b62d57304ad5" + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "decisions": { + "inline": [ + { + "adId": 183599115, + "advertiserId": 1988027, + "campaignId": 63285392, + "clickUrl": "https://e-11090.adzerk.net/r?e=eyJ2IjoiMS4xMSIsImF2IjoxOTg4MDI3LCJhdCI6NDMwOSwiYnQiOjAsImNtIjo2MzI4NTM5MiwiY2giOjU4MDgxLCJjayI6e30sImNyIjo4MTMyNTY5MCwiZGkiOiJiOTg3MGNkYTA5MTU0NDlmOTkwZGNkZTNmNjYyNGNhMyIsImRqIjowLCJpaSI6IjJmNjYwMjMyODBmYjQ4NTRiYTY0YzFlYzA1ZDU5MTNiIiwiZG0iOjMsImZjIjoxODM1OTkxMTUsImZsIjoxNzU0MjE3OTUsImlwIjoiMTQyLjE4MS41OC41MiIsIm53IjoxMDkyMiwicGMiOjAsIm9wIjowLCJlYyI6MCwiZ20iOjAsImVwIjpudWxsLCJwciI6MjMyNjk5LCJydCI6MywicnMiOjUwMCwic2EiOiIzNCIsInNiIjoiaS0wNDZjMWNlNWRjYmExMTVjNSIsInNwIjozNzIzMDU1LCJzdCI6MTI0MzA2NiwidWsiOiJkOTU1N2Q2NS1kNWI5LTQyOTItYjg2My0xNGEyOTcyNTk3ZjQiLCJ6biI6Mjg1NDMxLCJ0cyI6MTY4MDU1NTc4MzkyMiwicG4iOiJpbmxpbmUiLCJnYyI6dHJ1ZSwiZ0MiOnRydWUsImdzIjoibm9uZSIsInR6IjoiQW1lcmljYS9OZXdfWW9yayIsInVyIjoiaHR0cDovL3d3dy5mbGlwcC5jb20ifQ&s=Mnss8P1kc37Eftik5RJvLJb4S9Y", + "contents": [ + { + "data": { + "customData": { + "campaignConfigUrl": "https://campaign-config.flipp.com/dist-campaign-admin/215", + "campaignNameIdentifier": "US Grocery Demo (Kroger)" + }, + "height": 1800, + "width": 300 + }, + "type": "raw" + } + ], + "creativeId": 81325690, + "flightId": 175421795, + "height": 1800, + "impressionUrl": "https://e-11090.adzerk.net/i.gif?e=eyJ2IjoiMS4xMSIsImF2IjoxOTg4MDI3LCJhdCI6NDMwOSwiYnQiOjAsImNtIjo2MzI4NTM5MiwiY2giOjU4MDgxLCJjayI6e30sImNyIjo4MTMyNTY5MCwiZGkiOiJiOTg3MGNkYTA5MTU0NDlmOTkwZGNkZTNmNjYyNGNhMyIsImRqIjowLCJpaSI6IjJmNjYwMjMyODBmYjQ4NTRiYTY0YzFlYzA1ZDU5MTNiIiwiZG0iOjMsImZjIjoxODM1OTkxMTUsImZsIjoxNzU0MjE3OTUsImlwIjoiMTQyLjE4MS41OC41MiIsIm53IjoxMDkyMiwicGMiOjAsIm9wIjowLCJlYyI6MCwiZ20iOjAsImVwIjpudWxsLCJwciI6MjMyNjk5LCJydCI6MywicnMiOjUwMCwic2EiOiIzNCIsInNiIjoiaS0wNDZjMWNlNWRjYmExMTVjNSIsInNwIjozNzIzMDU1LCJzdCI6MTI0MzA2NiwidWsiOiJkOTU1N2Q2NS1kNWI5LTQyOTItYjg2My0xNGEyOTcyNTk3ZjQiLCJ6biI6Mjg1NDMxLCJ0cyI6MTY4MDU1NTc4MzkyMywicG4iOiJpbmxpbmUiLCJnYyI6dHJ1ZSwiZ0MiOnRydWUsImdzIjoibm9uZSIsInR6IjoiQW1lcmljYS9OZXdfWW9yayIsImJhIjoxLCJmcSI6MH0&s=Qce4_IohtESeNA_sB71Qjb4TouY", + "prebid": { + "cpm": 12.34, + "creative":"creativeContent", + "creativeType": "NativeX", + "requestId": "test-imp-id" + }, + "priorityId": 232699, + "storefront": { + "campaignConfig": { + "fallbackImageUrl": "https://f.wishabi.net/arbitrary_files/115856/1666018811/115856_Featured Local Savings - Flipp Fallback - US (1).png", + "fallbackLinkUrl": "https://flipp.com/flyers/", + "tags": { + "advertiser": { + "engagement": "https://f.wishabi.net/creative/happyfruits/_itemlevelv2/apple.png?cb=[[random]]" + } + } + }, + "flyer_id": 5554080, + "flyer_run_id": 873256, + "flyer_type_id": 2826, + "is_fallback": true, + "merchant": "Kroger", + "merchant_id": 2778, + "name": "Weekly Ad", + "storefront_logo_url": "https://images.wishabi.net/merchants/qX1/BGIzc9sFcA==/RackMultipart20210421-1-e3k5rx.jpeg", + "storefront_payload_url": "https://cdn-gateflipp.flippback.com/storefront-payload/v2/873256/5554080/ff14f675705934507c269b5750e124a323bc9bf60e8a6f210f422f4528b233ff?merchant_id=2778", + "valid_from": "2023-03-29 04:00:00 +0000 UTC", + "valid_to": "2023-04-05 03:59:59 +0000 UTC" + }, + "width": 300 + } + ] + }, + "location": { + "accuracy_radius": 5, + "city": "Toronto", + "country": "CA", + "ip": "123.123.123.123", + "postal_code": "M4S", + "region": "ON", + "region_name": "Ontario" + } + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "183599115", + "impid": "test-imp-id", + "price": 12.34, + "adm": "creativeContent", + "crid": "81325690", + "w": 300 + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/flipp/flipptest/exemplary/simple-banner-native-param-user-gdpr.json b/adapters/flipp/flipptest/exemplary/simple-banner-native-param-user-gdpr.json new file mode 100644 index 00000000000..446ecd7d3f1 --- /dev/null +++ b/adapters/flipp/flipptest/exemplary/simple-banner-native-param-user-gdpr.json @@ -0,0 +1,177 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "test": 1, + "device": { + "ip": "123.123.123.123" + }, + "site": { + "id": "1243066", + "page": "http://www.example.com/test?flipp-content-code=publisher-test" + }, + "user": { + }, + "regs": { + "gdpr": 1 + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test", + "banner": { + "format": [ + { + "w": 300, + "h": 1800 + } + ] + }, + "ext": { + "bidder": { + "publisherNameIdentifier": "wishabi-test-publisher", + "creativeType": "NativeX", + "siteId": 1243066, + "zoneIds": [285431], + "options": { + "startCompact": true + }, + "userKey": "abc123" + } + } + } + + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://example.com/pserver", + "body": { + "ip":"123.123.123.123", + "keywords":[ + "" + ], + "placements":[ + { + "adTypes":[ + 4309, + 641 + ], + "count":1, + "divName":"inline", + "prebid":{ + "creativeType":"NativeX", + "height":1800, + "publisherNameIdentifier":"wishabi-test-publisher", + "requestId":"test-imp-id", + "width":300 + }, + "properties":{ + "contentCode":"publisher-test" + }, + "siteId":1243066, + "zoneIds":[ + 285431 + ], + "options": { + "startCompact": true + } + } + ], + "url":"http://www.example.com/test?flipp-content-code=publisher-test", + "user":{ + "key":"30470a14-2949-4110-abce-b62d57304ad5" + } + } + }, + "mockResponse": { + "status": 200, + "body": { + "decisions": { + "inline": [ + { + "adId": 183599115, + "advertiserId": 1988027, + "campaignId": 63285392, + "clickUrl": "https://e-11090.adzerk.net/r?e=eyJ2IjoiMS4xMSIsImF2IjoxOTg4MDI3LCJhdCI6NDMwOSwiYnQiOjAsImNtIjo2MzI4NTM5MiwiY2giOjU4MDgxLCJjayI6e30sImNyIjo4MTMyNTY5MCwiZGkiOiJiOTg3MGNkYTA5MTU0NDlmOTkwZGNkZTNmNjYyNGNhMyIsImRqIjowLCJpaSI6IjJmNjYwMjMyODBmYjQ4NTRiYTY0YzFlYzA1ZDU5MTNiIiwiZG0iOjMsImZjIjoxODM1OTkxMTUsImZsIjoxNzU0MjE3OTUsImlwIjoiMTQyLjE4MS41OC41MiIsIm53IjoxMDkyMiwicGMiOjAsIm9wIjowLCJlYyI6MCwiZ20iOjAsImVwIjpudWxsLCJwciI6MjMyNjk5LCJydCI6MywicnMiOjUwMCwic2EiOiIzNCIsInNiIjoiaS0wNDZjMWNlNWRjYmExMTVjNSIsInNwIjozNzIzMDU1LCJzdCI6MTI0MzA2NiwidWsiOiJkOTU1N2Q2NS1kNWI5LTQyOTItYjg2My0xNGEyOTcyNTk3ZjQiLCJ6biI6Mjg1NDMxLCJ0cyI6MTY4MDU1NTc4MzkyMiwicG4iOiJpbmxpbmUiLCJnYyI6dHJ1ZSwiZ0MiOnRydWUsImdzIjoibm9uZSIsInR6IjoiQW1lcmljYS9OZXdfWW9yayIsInVyIjoiaHR0cDovL3d3dy5mbGlwcC5jb20ifQ&s=Mnss8P1kc37Eftik5RJvLJb4S9Y", + "contents": [ + { + "data": { + "customData": { + "campaignConfigUrl": "https://campaign-config.flipp.com/dist-campaign-admin/215", + "campaignNameIdentifier": "US Grocery Demo (Kroger)" + }, + "height": 1800, + "width": 300 + }, + "type": "raw" + } + ], + "creativeId": 81325690, + "flightId": 175421795, + "height": 1800, + "impressionUrl": "https://e-11090.adzerk.net/i.gif?e=eyJ2IjoiMS4xMSIsImF2IjoxOTg4MDI3LCJhdCI6NDMwOSwiYnQiOjAsImNtIjo2MzI4NTM5MiwiY2giOjU4MDgxLCJjayI6e30sImNyIjo4MTMyNTY5MCwiZGkiOiJiOTg3MGNkYTA5MTU0NDlmOTkwZGNkZTNmNjYyNGNhMyIsImRqIjowLCJpaSI6IjJmNjYwMjMyODBmYjQ4NTRiYTY0YzFlYzA1ZDU5MTNiIiwiZG0iOjMsImZjIjoxODM1OTkxMTUsImZsIjoxNzU0MjE3OTUsImlwIjoiMTQyLjE4MS41OC41MiIsIm53IjoxMDkyMiwicGMiOjAsIm9wIjowLCJlYyI6MCwiZ20iOjAsImVwIjpudWxsLCJwciI6MjMyNjk5LCJydCI6MywicnMiOjUwMCwic2EiOiIzNCIsInNiIjoiaS0wNDZjMWNlNWRjYmExMTVjNSIsInNwIjozNzIzMDU1LCJzdCI6MTI0MzA2NiwidWsiOiJkOTU1N2Q2NS1kNWI5LTQyOTItYjg2My0xNGEyOTcyNTk3ZjQiLCJ6biI6Mjg1NDMxLCJ0cyI6MTY4MDU1NTc4MzkyMywicG4iOiJpbmxpbmUiLCJnYyI6dHJ1ZSwiZ0MiOnRydWUsImdzIjoibm9uZSIsInR6IjoiQW1lcmljYS9OZXdfWW9yayIsImJhIjoxLCJmcSI6MH0&s=Qce4_IohtESeNA_sB71Qjb4TouY", + "prebid": { + "cpm": 12.34, + "creative":"creativeContent", + "creativeType": "NativeX", + "requestId": "test-imp-id" + }, + "priorityId": 232699, + "storefront": { + "campaignConfig": { + "fallbackImageUrl": "https://f.wishabi.net/arbitrary_files/115856/1666018811/115856_Featured Local Savings - Flipp Fallback - US (1).png", + "fallbackLinkUrl": "https://flipp.com/flyers/", + "tags": { + "advertiser": { + "engagement": "https://f.wishabi.net/creative/happyfruits/_itemlevelv2/apple.png?cb=[[random]]" + } + } + }, + "flyer_id": 5554080, + "flyer_run_id": 873256, + "flyer_type_id": 2826, + "is_fallback": true, + "merchant": "Kroger", + "merchant_id": 2778, + "name": "Weekly Ad", + "storefront_logo_url": "https://images.wishabi.net/merchants/qX1/BGIzc9sFcA==/RackMultipart20210421-1-e3k5rx.jpeg", + "storefront_payload_url": "https://cdn-gateflipp.flippback.com/storefront-payload/v2/873256/5554080/ff14f675705934507c269b5750e124a323bc9bf60e8a6f210f422f4528b233ff?merchant_id=2778", + "valid_from": "2023-03-29 04:00:00 +0000 UTC", + "valid_to": "2023-04-05 03:59:59 +0000 UTC" + }, + "width": 300 + } + ] + }, + "location": { + "accuracy_radius": 5, + "city": "Toronto", + "country": "CA", + "ip": "123.123.123.123", + "postal_code": "M4S", + "region": "ON", + "region_name": "Ontario" + } + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ + { + "bid": { + "id": "183599115", + "impid": "test-imp-id", + "price": 12.34, + "adm": "creativeContent", + "crid": "81325690", + "w": 300 + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/flipp/flipptest/exemplary/simple-banner-native-param-user.json b/adapters/flipp/flipptest/exemplary/simple-banner-native-param-user.json index 272bcd744ab..21957ae7096 100644 --- a/adapters/flipp/flipptest/exemplary/simple-banner-native-param-user.json +++ b/adapters/flipp/flipptest/exemplary/simple-banner-native-param-user.json @@ -10,6 +10,11 @@ "page": "http://www.example.com/test?flipp-content-code=publisher-test" }, "user": { + "consent": "CP0xeHPP0xeHPBcABBENAgCAAPAAAAAAAGcgAAAAAAAA" + }, + "regs": { + "coppa": 0, + "gdpr": 0 }, "imp": [ {