From a460995073e2a3200289cf47053c94f48240ad03 Mon Sep 17 00:00:00 2001 From: Jeremy Sadwith Date: Tue, 23 Aug 2022 14:46:59 -0400 Subject: [PATCH] Adding Social Canvas support --- modules/kargoBidAdapter.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/kargoBidAdapter.js b/modules/kargoBidAdapter.js index deeb1cb8630..f4563081aa7 100644 --- a/modules/kargoBidAdapter.js +++ b/modules/kargoBidAdapter.js @@ -61,6 +61,13 @@ export const spec = { }, prebidRawBidRequests: validBidRequests }, spec._getAllMetadata(bidderRequest, tdid)); + + // Pull Social Canvas segments and embed URL + if (validBidRequests.length > 0 && validBidRequests[0].params.socialCanvas) { + transformedParams.socialCanvasSegments = validBidRequests[0].params.socialCanvas.segments; + transformedParams.socialEmbedURL = validBidRequests[0].params.socialCanvas.embedURL; + } + const encodedParams = encodeURIComponent(JSON.stringify(transformedParams)); return Object.assign({}, bidderRequest, { method: 'GET',