Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liveramp idl envelope #226

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9e9819e
add release 2.1.6 adapter changes
Feb 11, 2020
dc34f09
add uspConsent
Feb 11, 2020
c8c790b
add schain support
Feb 11, 2020
a1db01d
fix schain config and parcel location
Feb 13, 2020
b2f0b7e
formatting fixes, commenting updates
Feb 13, 2020
2715e21
test fix
Feb 13, 2020
ccedba3
reverted doc update
Feb 13, 2020
4815ee1
remove added line-break
Feb 13, 2020
14f4927
fix lint errors
Feb 24, 2020
5c59300
Merge pull request #181 from indexexchange/master
ix-certification Apr 2, 2020
a1fa29e
Merge pull request #160 from jsnellbaker/update_appnexus_endpoint
ix-certification Apr 28, 2020
78c09d1
Merge pull request #89 from oath-jac/feature/aol-adapter
ix-certification Jul 16, 2020
623465e
Merge pull request #193 from indexexchange/master
ix-certification Jul 21, 2020
ae48919
Merge pull request #196 from indexexchange/master
ix-certification Aug 12, 2020
a79da4b
Merge pull request #189 from PWyrembak/master
ix-certification Aug 19, 2020
23ace03
Merge pull request #204 from indexexchange/master
ix-certification Sep 1, 2020
82a1a9e
Merge pull request #170 from idettman/add-ccpa-schain
ix-certification Sep 2, 2020
7b3f1e9
Merge pull request #151 from nwlosinski/feature/ccpa-support
ix-certification Sep 9, 2020
9a80e37
Merge pull request #163 from pycnvr/cnvr_ccpa
ix-certification Sep 10, 2020
f3c7076
HTP-131 Consumable: CCPA/GDPR Consent Support (#187)
djcsdy Sep 10, 2020
f99f23e
[HTP-0001] 33Across Adapter: Fix Validation (#206) (#209)
ix-certification Oct 6, 2020
1fa1abf
Kargo Adapter: send idl envelope and identityData
BernhardValenti Nov 16, 2020
59f89ed
Kargo Adapter: add gdpr support
BernhardValenti Feb 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions consumable/CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 2.1.0
- Add support for CCPA and GDPR consent information.
- Add missing parameters to bid request.
- Improve documentation.
152 changes: 152 additions & 0 deletions consumable/DOCUMENTATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# Consumable
## General Compatibility
|Feature| |
|---|---|
| Consent | Yes |
| Native Ad Support | Yes |
| SafeFrame Support | Yes |
| PMP Support | No |

## Browser Compatibility
| Browser | |
|--- |---|
| Chrome | Yes |
| Edge | Yes |
| Firefox | Yes |
| Internet Explorer 9 | No |
| Internet Explorer 10 | Yes |
| Internet Explorer 11 | Yes |
| Safari | Yes |
| Mobile Chrome | Yes |
| Mobile Safari | Yes |
| UC Browser | No |
| Samsung Internet | No |
| Opera | Yes |

## Adapter Information
| Info | |
|---|---|
| Partner Id | ConsumableHtb |
| Ad Server Responds in (Cents, Dollars, etc) | Dollars |
| Bid Type (Gross / Net) | Net |
| GAM Key (Open Market) | ix_cnsm_id |
| GAM Key (Private Market) | ix_cnsm_dealid |
| Ad Server URLs | serverbid.com |
| Slot Mapping Style (Size / Multiple Sizes / Slot) | Size |
| Request Architecture (MRA / SRA) | SRA |

## Currencies Supported
USD $

## Bid Request Information
### Parameters
| Key | Required | Type | Description |
|---|---|---|---|
| `placements` | Yes | `Array\<Placement\>` | List of ad placements (slots) to bid on |
| `time` | Yes | `Integer` | Time and date of the request as milliseconds elapsed since January 1, 1970 |
| `user` | Yes | `Object` | Currently always an empty object |
| `url` | Yes | `String` | URL of the current page |
| `referrer` | No | `String` | URL of the referrer |
| `enableBotFiltering` | Yes | `Boolean` | Always `true` |
| `includePricingData` | Yes | `Boolean` | Always `true` |
| `parallel` | Yes | `Boolean` | Always `true` |

### Placement
| Key | Required | Type | Description |
| --- | --- | --- | --- |
| `divName` | Yes | `String` | Name of the slot to bid on |
| `adTypes` | Yes | `Array\<Integer\>` | List of IDs that determines possible ad sizes |
| `siteId` | Yes | `String` | Fixed identifier supplied by Consumable |
| `networkId` | Yes | `String` | Fixed identifier supplied by Consumable |
| `zoneIds` | No | `Array\<Integer\>` | List of fixed identifiers supplied by Consumable
| `unitId` | No | `String` | Fixed identifier supplied by Consumable |
| `unitName` | No | `String` | Fixed identifier supplied by Consumable |

### Example
```json
{
"placements":[
{
"divName": "28cbf8f87b7d5",
"adTypes": [5],
"siteId": "1035514",
"networkId": "9969",
"zoneIds": [188825],
"unitId": "4508",
"unitName": "cnsmbl-audio-320x50-slider"
}
],
"time": 1538599207715,
"user": {},
"url": "http://example.com/page/path",
"referrer": "http://example.com/another/page",
"enableBotFiltering": true,
"includePricingData": true,
"parallel": true
}
```


## Bid Response Information
### Bid Example
```json
{
"decisions":{
"2e53ecd4a29b06":{
"adId":-7176956978374674467,
"impressionUrl":"https://e.serverbid.com/i/?i=ARAAAAAAAAAAcP...",
"contents":[
{
"body":"<script src=\"https://nym1-ib.adnxs.com/ab?e=wqT...\"></script>",
"data":null,
"type":"rtb"
}
],
"height":250,
"width":300,
"pricing":{
"clearPrice":0.3075,
"eCPM":0.0,
"price":0.0,
"rateType":2,
"revenue":0.0
}
}
}
}
```

### Pass Example
```json
{
"user": {
"key": "ad39231daeb043f2a9610414f08394b5"
},
"decisions": {
"2e53ecd4a29b06": null
}
}
```

## Configuration Information
### Configuration Keys
| Key | Required | Type | Description |
|---|---|---|---|
| `networkId` | Yes | `String` | Network ID (supplied by Consumable) |
| `siteId` | Yes | `String` | Site ID (supplied by Consumable) |
| `zoneIds` | No | `Array\<Integer\>` | Zone IDs (supplied by Consumable) |
| `unitId` | Yes | `String` | Unit ID (supplied by Consumable) |
| `unitName` | Yes | `String` | Unit Name (supplied by Consumable) |
| `sizes` | Yes | `Array\<\[Integer, Integer\]\>` | Possible sizes of the ad in pixels (`\[width, height\]`) |

### Example
```
{
"networkId": "9969",
"siteId": "1029010",
"zoneIds": [187327],
"unitId": "4508",
"unitName": "cnsmbl-audio-320x50-slider",
"sizes": [[320, 50]]
}
```
5 changes: 5 additions & 0 deletions consumable/consumable-htb-exports.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//? if (FEATURES.GPT_LINE_ITEMS) {
shellInterface.ConsumableHtb = {
render: SpaceCamp.services.RenderService.renderDfpAd.bind(null, 'ConsumableHtb')
};
//? }
148 changes: 148 additions & 0 deletions consumable/consumable-htb-system-tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
'use strict';

function getPartnerId() {
return 'ConsumableHtb';
}

function getStatsId() {
return 'CNSM';
}

function getBidRequestRegex() {
return {
method: 'POST',
urlRegex: /^https?:\/\/e\.serverbid\.com\/api\//
};
}

function getCallbackType() {
return 'NONE';
}

function getArchitecture() {
return 'SRA';
}

function getConfig() {
return {
xSlots: {
1: {
networkId: '9969',
siteId: '1029010',
zoneIds: [187327],
unitId: '4508',
unitName: 'cnsmbl-audio-320x50-slider',
sizes: [[320, 50]]
},
2: {
networkId: '9969',
siteId: '1029010',
zoneIds: [187327],
unitId: '4508',
unitName: 'cnsmbl-audio-320x50-slider',
sizes: [[320, 50]]
}
}
};
}

function validateBidRequest(request) {
expect(request.host).toBe('e.serverbid.com');
expect(request.pathname).toBe('/api/v2');
expect(request.query).toEqual({});

var data = JSON.parse(request.body);
expect(data.gdpr).toBeDefined();
expect(data.gdpr.applies).toBeDefined();
expect(data.gdpr.consent).toBeDefined();
}

function getValidResponse(request, creative) {
return JSON.stringify({
user: {
key: 'ad39231daeb043f2a9610414f08394b5'
},
decisions: {
1: {
adId: 1234,
creativeId: 2345,
flightId: 3456,
campaignId: 4567,
clickUrl: 'http://example.org/click',
impressionUrl: 'http://example.org/impression',
contents: [
{
type: 'html',
body: creative
}
],
height: 50,
width: 320,
events: [],
pricing: {
price: 0,
clearPrice: 2,
revenue: 0.002,
rateType: 2,
eCPM: 0
}
},
2: {
adId: 1234,
creativeId: 2345,
flightId: 3456,
campaignId: 4567,
clickUrl: 'http://example.org/click',
impressionUrl: 'http://example.org/impression',
contents: [
{
type: 'html',
body: creative
}
],
height: 50,
width: 320,
events: [],
pricing: {
price: 0,
clearPrice: 2,
revenue: 0.002,
rateType: 2,
eCPM: 0
}
}
}
});
}

function validateTargeting(targetingMap) {
expect(targetingMap).toEqual(jasmine.objectContaining({
ix_cnsm_id: jasmine.arrayWithExactContents([jasmine.any(String), jasmine.any(String)]),
ix_cnsm_cpm: jasmine.arrayWithExactContents(['320x50_200', '320x50_200'])
}));
}

function getPassResponse() {
return JSON.stringify({
user: {
key: 'ad39231daeb043f2a9610414f08394b5'
},
decisions: {
1: null,
2: null
}
});
}

module.exports = {
getPartnerId: getPartnerId,
getStatsId: getStatsId,
getBidRequestRegex: getBidRequestRegex,
getCallbackType: getCallbackType,
getArchitecture: getArchitecture,
getConfig: getConfig,
validateBidRequest: validateBidRequest,
getValidResponse: getValidResponse,
validateTargeting: validateTargeting,
getPassResponse: getPassResponse
};
80 changes: 80 additions & 0 deletions consumable/consumable-htb-validator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
'use strict';

////////////////////////////////////////////////////////////////////////////////
// Dependencies ////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

var Inspector = require('../../../libs/external/schema-inspector.js');

////////////////////////////////////////////////////////////////////////////////
// Main ////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

/* =============================================================================
* STEP 0 | Config Validation
* -----------------------------------------------------------------------------
* This file contains the necessary validation for the partner configuration.
* This validation will be performed on the partner specific configuration object
* that is passed into the wrapper. The wrapper uses an outside library called
* schema-insepctor to perform the validation. Information about it can be found here:
* https://atinux.fr/schema-inspector/.
*/
function partnerValidator(configs) {
var result = Inspector.validate({
type: 'object',
properties: {
xSlots: {
type: 'object',
properties: {
'*': {
type: 'object',
properties: {
networkId: {
type: 'string',
minLength: 1
},
siteId: {
type: 'string',
minLength: 1
},
zoneIds: {
type: 'array',
optional: true,
items: {
type: 'number'
}
},
unitId: {
type: 'string',
minLength: 1
},
unitName: {
type: 'string',
minLength: 1
},
sizes: {
type: 'array',
minLength: 1,
items: {
type: 'array',
exactLength: 2,
items: {
type: 'number'
}
}
}
}
}
}
}
}
}, configs);

if (!result.valid) {
return result.format();
}

return null;
}

module.exports = partnerValidator;
Loading