Jump to content

Async code do not works for my site


Recommended Posts

Hi, i use this code to render my ads from multiple banners linked to a zone:

<script type="text/javascript" src='//www.MYSITE.com/rv-ads/www/delivery/spcjs.php?id=1&amp;block=1'></script>
                    <script type='text/javascript'>OA_show(1);</script>

And It works as expected, but when i change it to async:

<ins data-revive-zoneid="1" data-revive-id="..id_numbers.."></ins>
<script async src="//www.MYSITE.com/web/rv-ads/www/delivery/asyncjs.php"></script>

The banners disappear, i can't understand what's wrong.

Link to comment
Share on other sites

hi Luna, I was looking at the source from your page http://www.onlinecasinoselite.com/test2.php and I don't know if this has anything to do with your issue, but your paths are different between the two revive calls:



Note the "/rv-ads/... and /web/rv-ads/...

This may not be the problem, but it might be something to look into?



Sure, both codes here: http://goo.gl/e1bvIk

Having said that, now asyncjs.php is not working for me either, thankfully there are 2 other methods to get the ads: SPC + JS :\

Edited by Richard Foley
Link to comment
Share on other sites

hi Luna,

I've just tried setting a local test up myself using different revive calls. You can see this test here, where you should see three (3) ads, (where1=spc, 2=async, 3=js). Interestingly, all 3 calls work just fine there, (when the file resides on the revive server host). However, the async (middle) call does NOT work when I copy and paste the identical file onto my LOCAL system.

Therefore, I suspect *something* in the handling of the network handshake/exchange. Remember I had a similar problem when my DNS was invalid and didn't pick up the server destination correctly. It's *possible* something like this is hitting both of us in a similar way here. I notice that the working file has an iframe loaded where the successful async calls from, and the non-working local version receives nothing.

This is strange because this is loading the identical html file, placed in two different locations, (local=fails and remote=works), but called from the same local place, and getting a different result :)  To put this another way, it's as if Revive is saying: "I'll deliver you an ad asynchronously, but only if you are on the same server as me." This is clearly unlikely for affiliate websites. If it's an apache issue (for instance), you'd expect no ads to be delivered. 

I'm sure someone with a grip on the Revive asyncjs.php code itself has a better idea of what is going on here...

Edited by Richard Foley
Link to comment
Share on other sites

I found (my) problem .. the test file (http://goo.gl/e1bvIk) works fine now.

My mistake, apologies to programmers.

In the /rv-ads/www/delivery/ folder, i added this line of code: MAX_header( 'X-Robots-Tag: noindex, nofollow', true); to some of the files there, in order to exclude the robots.txt and return ads with header checker 'noindex, nofollow'. The error was to add such code into asyncjs.php, which was useless and was the cause of the error.

I can now exclude the robots restriction. If i check the header of the ads url/path, it returns: X-Robots-Tag: noindex, nofollow.

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.

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...