Skip to content

Commit

Permalink
Updated bid adapter to log errors (#12300)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipeneves authored Oct 10, 2024
1 parent 9965e0e commit b301a32
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion modules/impactifyBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const DEFAULT_VIDEO_WIDTH = 640;
const DEFAULT_VIDEO_HEIGHT = 360;
const ORIGIN = 'https://sonic.impactify.media';
const LOGGER_URI = 'https://logger.impactify.media';
const LOGGER_JS_URI = 'https://log.impactify.it'
const AUCTION_URI = '/bidder';
const COOKIE_SYNC_URI = '/static/cookie_sync.html';
const GVL_ID = 606;
Expand Down Expand Up @@ -389,6 +390,19 @@ export const spec = {
});

return true;
}
},

/**
* Register bidder specific code, which will execute if the bid request failed
* @param {*} param0
*/
onBidderError: function ({ error, bidderRequest }) {
ajax(`${LOGGER_JS_URI}/logger`, null, JSON.stringify({ error, bidderRequest }), {
method: 'POST',
contentType: 'application/json'
});

return true;
},
};
registerBidder(spec);
2 changes: 1 addition & 1 deletion modules/impactifyBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
```
Module Name: Impactify Bidder Adapter
Module Type: Bidder Adapter
Maintainer: thomas.destefano@impactify.io
Maintainer: programmatic@impactify.io
```

# Description
Expand Down

0 comments on commit b301a32

Please sign in to comment.