Dubravko Posted June 1, 2016 Report Posted June 1, 2016 Hi, I noticed that when using Asynchronous JS tag if I have some JS code added to "HTML append" field for banner that code is not shown on site (usually third-party JavaScript code from client for impression tracking on their end). Banner shows just fine, but there is not JS code I added. If I use old JS tag invocation code to display that zone that it works fine. Can you advise on how to use additional JavaScript code in HTML append fields so it shows on site? This way is looks like custom JS code it is just stripped away. thanks d Quote
Matteo Beccati Posted June 1, 2016 Report Posted June 1, 2016 Hi, the prepend/append html by default will be disaplyed inside the iframe generated in order to contain the ad. Quote
Dubravko Posted June 2, 2016 Author Report Posted June 2, 2016 I know, but I'm not using IFRAME to display the ads. I'm using a Asynchronous JS tag invocation code (<ins>) which just inserts the banner image (<img>) in that <ins> tag then. But there is no <script> code that I added to append the banner. Just the image and anchor tag around it. thanks d Quote
Matteo Beccati Posted June 2, 2016 Report Posted June 2, 2016 Yes, what I meant is that by default async tags will create friendly iframes inside the <ins> tags and display the banner + prepend/append inside them, for maximum compatibility with 3rd party tags. Quote
Dubravko Posted June 2, 2016 Author Report Posted June 2, 2016 OK, I've made an example so I can explain the problem. Here is the simple HTML page with 1 zone loaded using async JS invocation code: http://www.trudnoca.hr/banners/openx_test/ You should be able to see only one banner there since the test campaign should display all the time without any limits. Now - I added a simple JS code to apped HTML field for that banner - but that code isn't show. It should open a alert dialog box. SS attached. If I use standard IFRAME invocation code then it works fine > http://www.trudnoca.hr/banners/openx_test/index_2.html And using standard JS code (insted of async) also works fine> http://www.trudnoca.hr/banners/openx_test/index_3.html Last 2 URL-s open alert dialog for me - but now the first one. Do you know why? thanks d OK, now I see that it works on all 3 urls :) Quote
Dubravko Posted June 3, 2016 Author Report Posted June 3, 2016 I see why this is happening. Someone already reported that here: https://github.com/revive-adserver/revive-adserver/issues/592 In case you have HTML around the zone (prepend and append HTML on zone properties) and you also have some JS code in prepend/append fields (but for banner) that there is JS error in Revive .js file. I'll test with latest version. d andrewatfornax 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.