diff --git a/dev-docs/publisher-api-reference/renderAd.md b/dev-docs/publisher-api-reference/renderAd.md index f642f845a8..f33d5fd383 100644 --- a/dev-docs/publisher-api-reference/renderAd.md +++ b/dev-docs/publisher-api-reference/renderAd.md @@ -1,6 +1,6 @@ --- layout: api_prebidjs -title: pbjs.renderAd(doc, id) +title: pbjs.renderAd(doc, id, options) description: --- @@ -9,9 +9,22 @@ This function will render the ad (based on params) in the given iframe document **Kind**: static method of pbjs API +`options.clickThrough` optionally enables publishers to count clicks on prebid inventory in their distributing adserver. +The publisher may call renderAd with a third param accepting an object where the value of clickThrough will be checked. +If this property is set the value of clickThrough will replace any occurrence of ${CLICKTHROUGH} inside of the properties ad and adUrl. If no match is found nothing will be replaced. + +{: .alert.alert-info :} +Note: In regards to `options.clickThrough`: +- To make use of this feature, bid adapters would be required to respond with ad tags including the ${CLICKTHROUGH} macro. +- The renderAd function must be invoked with the options argument. Ex: `renderAd(doc, bidId, {clickThrough: 'https://someadserverclickurl.com'});` +- Not compatible with safeframes (since the logic around rendering safeframe's does not invoke the renderAd function). +- Not supported with Prebid Universal Creative at this time, only the standard pbjs.renderAd method. + {: .table .table-bordered .table-striped } | Param | Scope | Type | Description | | --- | --- | --- | --- | | doc | Required | `object` | document | | id | Required | `string` | bid id to locate the ad | +| options | Optional | `object` | object containing other additional params to be used (listed below) | +| options.clickThrough | Optional | `string` | a url used to keep track of clicks on the ad to be rendered (used to resolve the ${CLICKTHROUGH} macro) |