wiley / madgex-lazy-ads

Deliver synchronous ads asynchronously, without modifying the ad code. Also, conditionally load ads for responsive websites using a media query or the ad container's dimensions.
MIT License
656 stars 42 forks source link

I can't seem to get it to run. #3

Closed pixelfuture closed 10 years ago

pixelfuture commented 10 years ago

You can see a JS Bin here: http://jsbin.com/hahofuja/1/edit?html,output

Would you be able to tell me if I have the syntax set incorrectly?

You can contact me on Twitter @pixelfuture if you would like. Thank you!

jackappleby commented 10 years ago

Hello, couple of problems here I think.

Firstly, the ad tags wrapping script element needs to also be included inside the HTML comments. For example:

<script type="text/lazyad">
      <!--
          <script type="text/javascript">
              ADSCRIPT
          </script>
      -->
</script>

Secondly, this included JavaScript - http://adtmag.com/design/ECG/adtmag/js/scripts.v5-ck.js - seems to stop the ads being injected. The ads are only injected for me when this file is removed from the source code. I'm not sure what's causing that.

Hope that gets you on the right track, let me know how it works out :)

jackappleby commented 10 years ago

Here's an example with a working leaderboard ad http://jsbin.com/mipuhoba/1/edit (with commented out troublesome script in head)

pixelfuture commented 10 years ago

Thank you! This helps a lot! I will work on it some more.

jackappleby commented 10 years ago

Resolved - implementation issue.