How Set Up ClickTAG in Google Swiffy?

870 Views Asked by At

I can't seem to get the clickTAG to work in Google Swiffy. Here is my code:

<script>
  var stage = new swiffy.Stage(document.getElementById('swiffycontainer'),
      swiffyobject, {  });
  stage.start();
   stage.setFlashVars("clickTag=http://google.com");

2

There are 2 best solutions below

0
On

I actually figured this out! The "stage.start();" line needs to come after "stage.setFlashVars("clickTag=http://google.com");"

Correct code looks like this:

<script>
  var stage = new swiffy.Stage(document.getElementById('swiffycontainer'),
      swiffyobject, {});
   stage.setFlashVars("clickTAG=http://www.google.com");  
  stage.start();
</script>
0
On

Yes It's like VaIM said.

If you have more doubts check this out:

https://support.google.com/dfp_premium/answer/6263155?hl=en

    <div id="swiffycontainer_%ecid!" style="width: %%WIDTH%%px; height: %%HEIGHT%%px"></div>
    <script>
      var stage = new swiffy.Stage(document.getElementById('swiffycontainer_%ecid!'),
          swiffyobject, {});
      stage.setFlashVars("clickTAG=%%CLICK_URL_ESC%%%%DEST_URL%%");           
      stage.start();
    </script>
  </body>