How to use widgets in your page

You can add widget to your web page in 2 ways, one for a specific content which will always open that specific content and dynamic widget which you can control which content should be loaded based on the page url from poltio platform.

So you can use the same snippet to load different widgets based on url.

Specific Content

  • If you want to use a specific content, you can use it as in the example. Here you need to add the public id of your content to the data-poltio-widget-content parameter.

Example Specific Content Widget

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

Dynamic Content (based on url)

  • Dynamic Widgets allows you to display different content without changing the SDK/iFrame code in your page depending on the URL of the page.

  • Here you need to add the your pid to the data-poltio-widget-pid parameter.

  • You can create dynamic widget from the Platform dynamic widgets page.

Example Dynamic Content Widget

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