We’ve migrated our documentation to a new site, which means some URLs have changed.
Audience

insertWidget() parameters

The following parameters can be specified in the insertWidget() call:

Parameter

Description

Default

Example

Mandatory

resizeToContentSize

(Optional) Set to true to allow text content to overflow the widget unit size in the vertical direction.

false


No

ctx

Context. The "context" for the request, often a URL.

N/A

ctx=http%3A%2F%2Fwww.cxense.com

No

delayImpression

(Optional) Delay the widget impression and rendering until the widget area becomes visible (scrolled into view)

false


No

renderTemplateUrl

(Optional) The URL of the render template to use for the layout of the widget

N/A


No

useSecureUrls

Set this flag to true to get HTTPS-versions of click URLs and content URLs

false

useSecureUrls=true

No

useMappedRenderTemplate

(Optional) Use the render template that has been mapped to this widget in the Render Template Mapper

false


No

templateElementId

It specifies the tag of the rendering part.




targetElementId

It specifies the tag of the insert part.




onImpressionResult

(Optional) Reference to a function that will received a callback when receiving impressions results

N/A


No

insertBeforeElementId

The id of any element to insert the widget before in the DOM tree




synchronous

(Optional) For synchronous approach (The asynchronous version is recommended.)

false

synchronous: true

No

widgetId

The Widget identifier

N/A - obtain from the UI/API. 


Yes

width

Width dimension of the widget.



No

height

Height dimension of the widget



No 


Last updated: