Skip to content

Commit

Permalink
Sending window location to server if possible (#2914)
Browse files Browse the repository at this point in the history
* nanointeractive bid adapter

* nanointeractive bid adapter

* - using utils.getParameterByName instead of utils.getTopWindowLocation().href
- bidderCode is removed
- Default ALG changed to 'ihr'
- added protocol to 'cors' param

* markdown file

* enabling localhost for bid requests

* Bugfix interpretResponse - added body; Removed unnecessary parameters; Adjusted tests;

* New feature - subId

* Fixed lint errors

* Nano Interactive Bid Adapter
   New Bid params:
     - categoryName
     - name
   Getting referrer information

* Fixed documentation

* Removed unnecessary parameter from documentation

* Cleaning up documentation

* - Sending window location to server if possible

* - Lint errors fix

* Using utils.js method for sending location to server

* Removing unnecessary parameter passing
  • Loading branch information
rade-popovic authored and snapwich committed Aug 2, 2018
1 parent c1a04f1 commit a568fdf
Show file tree
Hide file tree
Showing 2 changed files with 243 additions and 491 deletions.
6 changes: 6 additions & 0 deletions modules/nanointeractiveBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const CATEGORY = 'category';
export const CATEGORY_NAME = 'categoryName';
export const SUB_ID = 'subId';
export const REF = 'ref';
export const LOCATION = 'loc';

export const spec = {

Expand Down Expand Up @@ -52,6 +53,7 @@ function createSingleBidRequest (bid) {
sizes: bid.sizes.map(value => value[0] + 'x' + value[1]),
bidId: bid.bidId,
cors: utils.getOrigin(),
[LOCATION]: createLocationParam(),
};
}

Expand Down Expand Up @@ -85,6 +87,10 @@ function createRefParam (bid) {
return bid.params[REF] ? null : utils.getTopWindowReferrer() || null;
}

function createLocationParam () {
return utils.getTopWindowLocation().href;
}

function isEngineResponseValid (response) {
return !!response.cpm && !!response.ad;
}
Expand Down
Loading

0 comments on commit a568fdf

Please sign in to comment.