Search code examples
google-swiffy

Multiple adverts on the same page with google-swiffy


I have a page that is to display multiple ads. So far and for the current swiffy runtime (7.2.0) even if I setup two stages, only the last one defined starts.

var stage1 = new swiffy.Stage(document.getElementById('container1'),
      swiffyobject1, {  });
stage1.start();
var stage2 = new swiffy.Stage(document.getElementById('container2'),
      swiffyobject2, {  });
stage2.start();

if I do that, only stage2 will start. Is there any solution so I can have more than one such stages on one page? Only working way was to iframe each add as a page, which I don't really like.


Solution

  • I believe it is a issue on swiffy v.7.2.0

    I just pointed to version 5.2 and get it back working again.

    Just change your script reference to: https://www.gstatic.com/swiffy/v5.2/runtime.js