Skip to content

Commit

Permalink
Merge pull request #15 from Lotame/feature/GRUE-339_merge_to_master
Browse files Browse the repository at this point in the history
Feature/grue 339 merge to master
  • Loading branch information
Tonsil authored Jan 17, 2023
2 parents f003c92 + be88fac commit a2cc77f
Show file tree
Hide file tree
Showing 41 changed files with 2,051 additions and 995 deletions.
5 changes: 5 additions & 0 deletions integrationExamples/gpt/adloox.html
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,13 @@
realTimeData: {
auctionDelay: AUCTION_DELAY,
dataProviders: [
{
name: 'intersection',
waitForIt: true
},
{
name: 'adloox',
waitForIt: true,
params: { // optional, defaults shown
thresholds: [ 50, 60, 70, 80, 90 ],
slotinpath: false
Expand Down
4 changes: 0 additions & 4 deletions modules/adagioBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,10 +669,8 @@ function autoFillParams(bid) {
}

// extra params
setExtraParam(bid, 'environment');
setExtraParam(bid, 'pagetype');
setExtraParam(bid, 'category');
setExtraParam(bid, 'subcategory');
}

function getPageDimensions() {
Expand Down Expand Up @@ -1094,8 +1092,6 @@ export const spec = {
bidObj.placement = bidReq.params.placement;
bidObj.pagetype = bidReq.params.pagetype;
bidObj.category = bidReq.params.category;
bidObj.subcategory = bidReq.params.subcategory;
bidObj.environment = bidReq.params.environment;
}
bidResponses.push(bidObj);
});
Expand Down
26 changes: 4 additions & 22 deletions modules/adagioBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ Below, the list of Adagio params and where they can be set.
| Param name | Global config | AdUnit config |
| ---------- | ------------- | ------------- |
| siteId | x |
| organizationId (obsolete) | | x
| site (obsolete) | | x
| organizationId * | | x
| site * | | x
| pagetype | x | x
| environment | x | x
| category | x | x
| subcategory | x | x
| useAdUnitCodeAsAdUnitElementId | x | x
| useAdUnitCodeAsPlacement | x | x
| placement | | x
Expand All @@ -31,6 +29,8 @@ Below, the list of Adagio params and where they can be set.
| video | | x
| native | | x

_* These params are deprecated in favor the Global configuration setup, see below._

### Global configuration

The global configuration is used to store params once instead of duplicate them to each adUnit. The values will be used as "params" in the ad-request.
Expand All @@ -49,9 +49,7 @@ pbjs.setConfig({
// - underscores `_`
// Also, each param can have at most 50 unique active values (case-insensitive).
pagetype: 'article', // Highly recommended. The pagetype describes what kind of content will be present in the page.
environment: 'mobile', // Recommended. Environment where the page is displayed.
category: 'sport', // Recommended. Category of the content displayed in the page.
subcategory: 'handball', // Optional. Subcategory of the content displayed in the page.
useAdUnitCodeAsAdUnitElementId: false, // Optional. Use it by-pass adUnitElementId and use the adUnit code as value
useAdUnitCodeAsPlacement: false, // Optional. Use it to by-pass placement and use the adUnit code as value
},
Expand All @@ -62,9 +60,7 @@ pbjs.setConfig({

Adagio will use FPD data as fallback for the params below:
- pagetype
- environment
- category
- subcategory

If the FPD value is an array, the 1st value of this array will be used.

Expand Down Expand Up @@ -107,9 +103,7 @@ var adUnits = [
debug: true,
adagio: {
pagetype: 'article',
environment: 'mobile',
category: 'sport',
subcategory: 'handball',
useAdUnitCodeAsAdUnitElementId: false,
useAdUnitCodeAsPlacement: false,
}
Expand Down Expand Up @@ -208,12 +202,6 @@ var adUnits = [
return bidResponse.site;
}
},
{
key: "environment",
val: function (bidResponse) {
return bidResponse.environment;
}
},
{
key: "placement",
val: function (bidResponse) {
Expand All @@ -231,12 +219,6 @@ var adUnits = [
val: function (bidResponse) {
return bidResponse.category;
}
},
{
key: "subcategory",
val: function (bidResponse) {
return bidResponse.subcategory;
}
}
]
}
Expand Down
8 changes: 5 additions & 3 deletions modules/adlooxAnalyticsAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,21 @@ When tracking video you have two options:

To view an [example of an Adloox integration](../integrationExamples/gpt/adloox.html):

gulp serve --nolint --notest --modules=gptPreAuction,categoryTranslation,dfpAdServerVideo,rtdModule,instreamTracking,rubiconBidAdapter,spotxBidAdapter,adlooxAnalyticsAdapter,adlooxAdServerVideo,adlooxRtdProvider
gulp serve --nolint --notest --modules=gptPreAuction,categoryTranslation,dfpAdServerVideo,intersectionRtdProvider,rtdModule,instreamTracking,rubiconBidAdapter,spotxBidAdapter,adlooxAnalyticsAdapter,adlooxAdServerVideo,adlooxRtdProvider

**N.B.** `categoryTranslation` is required by `dfpAdServerVideo` that otherwise causes a JavaScript console warning

**N.B.** `intersectionRtdProvider` is used by `adlooxRtdProvider` to provide (above-the-fold) ATF measurement, if not enabled the `atf` segment will not be available

Now point your browser at: http://localhost:9999/integrationExamples/gpt/adloox.html?pbjs_debug=true

### Public Example

The example is published publically at: https://storage.googleapis.com/adloox-ads-js-test/prebid.html?pbjs_debug=true
The example is published publicly at: https://storage.googleapis.com/adloox-ads-js-test/prebid.html?pbjs_debug=true

**N.B.** this will show a [CORS error](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors) for the request `https://p.adlooxtracking.com/q?...` that is safe to ignore on the public example page; it is related to the [RTD integration](./adlooxRtdProvider.md) which requires pre-registration of your sites

It is recommended you use [Google Chrome's 'Local Overrides' located in the Developer Tools panel](https://www.trysmudford.com/blog/chrome-local-overrides/) to explore the example without the inconvience of having to run your own web server.
It is recommended you use [Google Chrome's 'Local Overrides' located in the Developer Tools panel](https://www.trysmudford.com/blog/chrome-local-overrides/) to explore the example without the inconvenience of having to run your own web server.

#### Pre-built `prebid.js`

Expand Down
Loading

0 comments on commit a2cc77f

Please sign in to comment.