Jump to content
Search Community

Sikmek Banner in iframe

martya test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Has anyone had problems embedding a sizmek banner in an iframe to demo? I usually embed them in an iframe through a webapp that I built, but the sikmek banners don't run - the EB init event listener never gets hit, but works fine when served directly (without iframe)

It's a pretty standard clicktag implementation. Is there a known issue with doing this?

 

Thanks

Marty

Link to comment
Share on other sites

I've never had a problem using iframes/our preview site to display Sizmek banners.  Do you have an Ad Blocker running that could be causing issues?  

 

Can you share an example file that you've had trouble with?

Can you confirm if you can still host through an iFrame?

 

 

They have changed something recently. Now only this include works:

 

<script src="https://secure-ds.serving-sys.com/BurstingScript/EBLoader.js"></script>

But best if You get/steal/beg for a SIZMEK login to try out Your banners in their MediaMind Sizmek MDX, where You can make preview links for them.

Yeh it's very hard dealing with media (via our pm and account execs etc), but a login would be ideal. I'll try and request access. 

 

It would still be good to find a work around, I've got a simple wrapper website that we deploy to so that our team can do internal QA etc, it sucks that I can't embed the sizmek ads any more, I slapped in a workaround on Friday to open them in a new window but it would be nice to be able to embed again. I'll keep sniffing around I'm sure there's a way to trick their API.

 

Another line of thought was maybe my banner wrapper needs to run under https, that was the next thing I was going to try.

Link to comment
Share on other sites

Yes, all of my demo links which use iframes still work fine.

 

I've always uploaded/tested my own files on Sizmek/MediaMind/Eyeblaster (way back when), too.  I'm surprised there are agencies that don't get their developers logins.

 

 

It would be really helpful if you could share an example file/link so we could try to help troubleshoot.

  • Like 1
Link to comment
Share on other sites

I've done some more research on this. So I started by downloading a example sizmek template and putting it in my iframe wrapped and it worked straight away.

The template was - https://github.com/joemidi/sizmek-html5-template/tree/master/build from @joemidi 

 

I spent ages comparing code and found nothing really different. In the end I found that the only difference was that my banner has the content hidden initially until the banner is initialized. Once the init event is received, the container is made visible where as the the sample starts with the banner visible so it masks the fact that the init event isn't actually being hit. When I debugged the sample banner I found that it was not being initialized either. 

 

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Sizmek 300x250</title>
  <style type="text/css">
        #banner {
            display: none;
            z-index: 20;
        }
    </style>
  <script type="text/javascript" src="//ds.serving-sys.com/BurstingScript/EBLoader.js"></script>
  <script type="text/javascript">
  function initEB(){
    if (!EB.isInitialized()) {
      // this will never be hit
      EB.addEventListener(EBG.EventName.EB_INITIALIZED, startAd);
    }
    else {
      // this will never be hit
      startAd();
    }
  }
  
  function startAd() {
    // because the init never gets fired, this will never be hit
    document.getElementById("banner").style.visibility = "visible";
  }
  
  function handleClickthroughButtonClick() {
    EB.clickthrough();
  }
</script>

</head>

<body onload="initEB();">
  <div id="ad">
    <div id="banner">
      <div class="label"><strong>HTML5 Standard Banner:</strong> 300x250</div>
      <div class="buttons">
        <button id="clickthroughButton" class="button clickthrough" onclick="javascript:handleClickthroughButtonClick();">ClickThrough</button>
      </div>
    </div>
  </div>
</body>

</html>

So the above code will not work inside an iframe (you'll see nothing because it's hidden) and will work outside an iframe (direct). If I comment out the style block to hide the banner initially it will show the banner but thats just bypassing the sizmek API which is incorrect.

Link to comment
Share on other sites

The default code from Sizmek is this by the way:

var adDiv;

function initEB() {
    if (!EB.isInitialized()) {
        EB.addEventListener(EBG.EventName.EB_INITIALIZED, startAd);
    } else {
        startAd();
    }
}

function startAd() {
    adDiv = document.getElementById("ad");

    addEventListeners();
}

function addEventListeners() {
    document.getElementById("clickthrough-button").addEventListener("click", clickthrough);
}

function clickthrough() {
    EB.clickthrough();
}

window.addEventListener("load", initEB);

(The template you're using didn't come directly from Sizmek and the visibility styling isn't required or part of their API.)

Link to comment
Share on other sites

The default code from Sizmek is this by the way:

var adDiv;

function initEB() {
    if (!EB.isInitialized()) {
        EB.addEventListener(EBG.EventName.EB_INITIALIZED, startAd);
    } else {
        startAd();
    }
}

function startAd() {
    adDiv = document.getElementById("ad");

    addEventListeners();
}

function addEventListeners() {
    document.getElementById("clickthrough-button").addEventListener("click", clickthrough);
}

function clickthrough() {
    EB.clickthrough();
}

window.addEventListener("load", initEB);

(The template you're using didn't come directly from Sizmek and the visibility styling isn't required or part of their API.)

 

I've tried many combinations using their default examples and other peoples templates just to be sure. But surely it's not acceptable to begin animation without their API being initialized? StartAd() is where the animation should be triggered from and this won't trigger inside the iframe.

When I get some more time I'll continue trying some things. 

Link to comment
Share on other sites

  • 4 years later...

I just ran into this exact issue with both EBLoader.js and adkit.js. The listeners for EBG.EventName.EB_INITIALIZED nor the adkit.onready() never fires inside an iframe. Did any of you ever get to the bottom of this? So far I've only tried removing the iframe sandboxing restrictions, but it did not fix it.

Link to comment
Share on other sites

  • 2 months later...

Came here for this exact issue hoping to get an answer. We have an internal preview environment that we QA and get approval on final banners before sent off to publisher. It's a simple html page that contains links. When clicked it opens the banners in a lightbox. EVERY ad from EVERY other publisher works but Sizmek ads don't load. Come on Sizmek! Make it easy on us Devs or we recommend publishers that are willing to play along (there are plenty).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...