How do I add multiple widgets to a page?

Joakim Updated by Joakim

Widget v2

To implement more than one widgets on a single page, you have to add the script part of the implementation tag once in the <head> section of the webpage.

For every next widget add the following part with the widget's corresponding ID and class name (do not use this tag on your site, only an example).

strossle('9cc6fbaf-x5tt-5920-9b6e-6803456c3dec', '.strossle-widget');

For example:

<script>
  window.strossle=window.strossle||function(){(strossle.q=strossle.q||[]).push(arguments)};
  strossle('5ca6fbaf-c8ff-6849-9b6e-6801094c3dec', '.strossle-widget-header');
  strossle('4casdaaf-c8ff-957s-9b6e-6898rsfsdfsd', '.strossle-widget-infeed');
  strossle('2ca6fbaf-h7xx-89xs-9zxe-sdfkj7384dec', '.strossle-widget-footer');
</script>
<script async src="https://assets.strossle.com/strossle-widget-sdk/1/strossle-widget-sdk.js"></script>

For each of the widgets, add a div tag with its corresponding class name where you want it to appear.

<div class="strossle-widget-header"></div>

<div class="strossle-widget-infeed"></div>

<div class="strossle-widget-footer"></div>

 

Widget v1

Please make sure that the script tag is only included once per page.For example, you have received two widget codes from us:

<div data-spklw-widget="5ca6fbaf-c8ff-6849-9b6e-6801094c3dec"></div> 
<script src="//widgets.sprinklecontent.com/v2/sprinkle.js" async></script>
<div data-spklw-widget="4casdaaf-c8ff-957s-9b6e-6898rsfsdfsd"></div> 
<script src="//widgets.sprinklecontent.com/v2/sprinkle.js" async></script>

If you want both widgets to show on the same page, you should add 

<script src="//widgets.sprinklecontent.com/v2/sprinkle.js" async></script>

just once. The div tags should be placed where you want the widgets to appear.

How did we do?

Can I have more than one widget?

How do I add a widget in an iframe or through Ad Manager?

Contact