Skip to content

Commit

Permalink
sparteoBidAdapter: add adUnitCode (#12305)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanguylemeur-sparteo authored Oct 19, 2024
1 parent 1cdbb9d commit 68f879a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions modules/sparteoBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const converter = ortbConverter({
const imp = buildImp(bidRequest, context);

deepSetValue(imp, 'ext.sparteo.params', bidRequest.params);
imp.ext.sparteo.params.adUnitCode = bidRequest.adUnitCode;

return imp;
},
Expand Down
8 changes: 6 additions & 2 deletions test/spec/modules/sparteoBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const VALID_REQUEST_BANNER = {
'sparteo': {
'params': {
'networkId': '1234567a-eb1b-1fae-1d23-e1fbaef234cf',
'adUnitCode': 'id-1234',
'formats': ['corner']
}
}
Expand Down Expand Up @@ -112,7 +113,8 @@ const VALID_REQUEST_VIDEO = {
'pbadslot': 'video',
'sparteo': {
'params': {
'networkId': '1234567a-eb1b-1fae-1d23-e1fbaef234cf'
'networkId': '1234567a-eb1b-1fae-1d23-e1fbaef234cf',
'adUnitCode': 'id-5678'
}
}
}
Expand Down Expand Up @@ -147,6 +149,7 @@ const VALID_REQUEST = {
'sparteo': {
'params': {
'networkId': '1234567a-eb1b-1fae-1d23-e1fbaef234cf',
'adUnitCode': 'id-1234',
'formats': ['corner']
}
}
Expand All @@ -170,7 +173,8 @@ const VALID_REQUEST = {
'pbadslot': 'video',
'sparteo': {
'params': {
'networkId': '1234567a-eb1b-1fae-1d23-e1fbaef234cf'
'networkId': '1234567a-eb1b-1fae-1d23-e1fbaef234cf',
'adUnitCode': 'id-5678'
}
}
}
Expand Down

0 comments on commit 68f879a

Please sign in to comment.