Options

By default you only need your content id for a simple callout.

Simple Callout

<div
class="poltio-widget"
data-content="XXX"
></div>
<script
  defer
  src="https://platform.poltio.com/widget.js">
</script>

Width & Height

By default, the widget will have a 100% width of its container and have a 500px height.You can customize these params via data-width="XX" and data-height="YY"

Width & Height

<div
 class="poltio-widget"
 data-width="400"
 data-height="600"
 data-content="XXX"
></div>
<script
  defer
  src="https://platform.poltio.com/widget.js">
</script>

Alignment

By default, Poltio widgets align themselves in the middle of the area thats given to them. You can change this with data-align="left"

Alignment

<div
 class="poltio-widget"
 data-content="XXX"
 data-align="left"
></div>
<script
  defer
  src="https://platform.poltio.com/widget.js">
</script>

Auto Resize

By default, our sdk will adjust the height property based on the content frame and disable scrolling. You can disable this behavior by adding data-resize="false"

Auto Resize

<div
 class="poltio-widget"
 data-resize="false"
 data-height="300"
 data-content="XXX"
></div>
<script
  defer
  src="https://platform.poltio.com/widget.js">
</script>

Language

oltio widgets supports English, Turkish, German, French, Spanish, Italian, Romanian, Portuguese, Dutch, Thai, Hebrew and Arabic. By default, we select the locale based on browser locale. But you can adjust this manually by data-lang="tr" Also Poltio widget for rtl languages does rtl itself.

Supported Languages

- en
- tr
- de
- fr
- es
- it
- pt
- nl
- ro
- th
- he
- ar

Language

<div
 class="poltio-widget"
 data-lang="tr"
 data-content="XXX"
></div>
<script
  defer
  src="https://platform.poltio.com/widget.js">
</script>

Disclaimer

If you already notifying your visitors about cookie consent, you can disable cookie consent in the Poltio Widgets by: data-disclaimer="off"

Disclaimer

<div
 class="poltio-widget"
 data-disclaimer="off"
 data-content="XXX"
></div>
<script
  defer
  src="https://platform.poltio.com/widget.js">
</script>

Content

You can set the content for the widget by data-content="id". Or you can have one dynamically loaded widget per page by adding data-pid="XXX" instead of data-content. You can then customize what this widget will load from your Poltio panel based on page url or other parameters.

Content

<div
 class="poltio-widget"
 data-pid="XX""
></div>
<script
  defer
  src="https://platform.poltio.com/widget.js">
</script>

By default, Poltio widget leaves cookies. If you don't want this, you can use the data-cookie="off" parameter that follows.

Cookie

<div
 class="poltio-widget"
 data-cookie="off"
 data-content="XXX"
></div>
<script
  defer
  src="https://platform.poltio.com/widget.js">
</script>

By default, the poltio widget opens the links you add to the result in a new tab (_blank). If you want to use other target parameters ( _self, _parent, _top and none ) you need to add a parameter as follows, data-openlinks="target"

  • _self: the current browsing context. (Default)
  • _blank: usually a new tab, but users can configure browsers to open a new window instead.
  • _parent: the parent browsing context of the current one. If no parent, behaves as _self.
  • _top: the topmost browsing context (the "highest" context that's an ancestor of the current one). If no ancestors, behaves as _self.

Open Links

<div
 class="poltio-widget"
 data-openlinks="_self"
 data-content="XXX"
></div>
<script
  defer
  src="https://platform.poltio.com/widget.js">
</script>

Result Fit

By default, poltio widget smart crops the images on the result screens. You can use data-resultfit="vf", data-resultfit="fit" and data-resultfit="off" parameters according to the size of the images you use in the results.

  • Default: Crop the image automatically with smart zoom if the image is larger
  • data-resultfit="fit" We fit the image in 8:5 ratio without cropping
  • data-resultfit="vf": Crop via height for vertical image display
  • data-resultfit="off" Crop in the middle if the image is larger

Result Fit

<div
 class="poltio-widget"
 data-resultfit="off"
 data-content="XXX"
></div>
<script
  defer
  src="https://platform.poltio.com/widget.js">
</script>

Default (data-resultfit="default" or omittted.)

Vertical Fit (data-resultfit="vf" )

Fit (data-resultfit="fit" )

Off (data-resultfit="off" )


UUID

If you want to match poltio voters with your own users in a safe way, you can include our widget with a uuid param which we store and send it back to you in webhooks or reports.

UUID

<div
 class="poltio-widget"
 data-uuid="XX"
 data-content="XXX"
></div>
<script
  defer
  src="https://platform.poltio.com/widget.js">
</script>

Custom ID

If you need a secondary identifer for the session that you want to track via webhooks or from platform, you can use custom_id like uuid.

Custom ID

<div
 class="poltio-widget"
 data-custom_id="XX"
 data-content="XXX"
></div>
<script
  defer
  src="https://platform.poltio.com/widget.js">
</script>

UTM Parameters

By default if your page has utm parameters (eg: utm_source, utm_medium, utm_campaign, utm_content or utm_term) we will copy these utm params in our widget url so all pixel code events that you fire inside our widgets will also use these params by default.

If you want to customize utm parameters for the widget, you can use data-utm_XXX="xxx"

UTM Parameters

<div
 class="poltio-widget"
 data-utm_source="MySource"
 data-content="XXX"
></div>
<script
  defer
  src="https://platform.poltio.com/widget.js">
</script>