diff --git a/modules/conversantBidAdapter.js b/modules/conversantBidAdapter.js
index 9ad1357fa2a..3ffc54bbe80 100644
--- a/modules/conversantBidAdapter.js
+++ b/modules/conversantBidAdapter.js
@@ -196,7 +196,12 @@ export const spec = {
};
if (request.video) {
- bid.vastUrl = responseAd;
+ if (responseAd.charAt(0) === '<') {
+ bid.vastXml = responseAd;
+ } else {
+ bid.vastUrl = responseAd;
+ }
+
bid.mediaType = 'video';
bid.width = request.video.w;
bid.height = request.video.h;
diff --git a/test/spec/modules/conversantBidAdapter_spec.js b/test/spec/modules/conversantBidAdapter_spec.js
index 37a13312619..ca6890ceedb 100644
--- a/test/spec/modules/conversantBidAdapter_spec.js
+++ b/test/spec/modules/conversantBidAdapter_spec.js
@@ -156,6 +156,14 @@ describe('Conversant adapter tests', function() {
price: 3.99,
adomain: ['https://example.com'],
id: 'bid003'
+ }, {
+ nurl: 'notify004',
+ adm: '',
+ crid: '1004',
+ impid: 'bid004',
+ price: 4.99,
+ adomain: ['https://example.com'],
+ id: 'bid004'
}]
}]
},
@@ -315,7 +323,7 @@ describe('Conversant adapter tests', function() {
it('Verify interpretResponse', function() {
const request = spec.buildRequests(bidRequests);
const response = spec.interpretResponse(bidResponses, request);
- expect(response).to.be.an('array').with.lengthOf(3);
+ expect(response).to.be.an('array').with.lengthOf(4);
let bid = response[0];
expect(bid).to.have.property('requestId', 'bid000');
@@ -352,6 +360,9 @@ describe('Conversant adapter tests', function() {
expect(bid).to.have.property('mediaType', 'video');
expect(bid).to.have.property('ttl', 300);
expect(bid).to.have.property('netRevenue', true);
+
+ bid = response[3];
+ expect(bid).to.have.property('vastXml', '');
});
it('Verify handling of bad responses', function() {