Jump to content

Asynchronous JS tag - append banner HTML with additional <script> code


Recommended Posts

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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

code-1.jpg

OK, now I see that it works on all 3 urls :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...