Jump to content

Recommended Posts

 

digitaladapt could you post the example code of how you are calling this code. Thanks

 

ReferenceError: data is not defined
 

 

 

The last two lines of javascript got truncated in my post (I've gone back and corrected it).

 

Here is a complete example:

<!DOCTYPE html>
<html>
    <head>
        <script src="/path/to/element.write.js"></script>
        <script src="/path/to/writeCapture2.js"></script>
        <title>Async Ad Test</title>
    </head>
    <body>
        <div id="AdPlaceholder">
        <!-- ad will go here -->
        </div>
        <script>
        /* this function wrapper keeps global memory space clear of random variables */
        (function(){
            writeCapture.write(
                document.getElementById("AdPlaceholder"),
                '<scr' + 'ipt>' +
                    'var oxSrc = (document.location.protocol === "https:" ? "https:" : "http:")' +
                    '+ "//example.com/ReviveAdServer/www/delivery/ajs.php"' +
                    '+ "?zoneid=123&block=1&blockcampaign=1&cb=" + Math.floor(Math.random()*99999999999)' +
                    '+ "&charset=UTF-8&loc=" + encodeURIComponent(window.location)' +
                    '+ (document.MAX_used !== "," ? ("&exclude=" + document.MAX_used) : "")' +
                    '+ (document.referrer ? ("&referer=" + encodeURIComponent(document.referrer)) : "")' +
                    '+ (document.context ? ("&context=" + encodeURIComponent(document.context)) : "")' +
                    '+ (document.mmm_fo ? "&mmm_fo=1" : "");' +
                    'document.write("<scr" +  "ipt src=\'" + oxSrc + "\'></scr" + "ipt>");' +
                '</scr' + 'ipt>'
            );
        })();
        </script>
    </body>
</html>

Here is a simple real-world working example: http://constructionjobs.com/test.php

Share this post


Link to post
Share on other sites

The main theme for wanting async loading of ad's is to increase page load speed, and not have the ad's block the loading of the main content.

 

With google now rating the site on speed + content now slow page loads will kill google page rateings.

 

Ive worked around my issue for now with using the iframe code and using jquery.load to call the ad iframe.

 

Thanks for the input.

 

I would argue that page load speed shouldn't be an issue if Revive Adserver is installed on something with appropriate power (i.e. you don't get speed for free!) and that you can avoid blocking loading of the main content with bottom loading JS + CSS positioning -- but I certainly understand the point.

 

Glad you have a work around for now, and I'll certainly be having a chat with the Revive team about if we feel this is something we can take on to develop.

I've been monitoring the progress of this thread since I posted it and I still believe Asynchronous loading should be a top priority and is vital to speeding page load speeds.

 

And if Revive wants to be at the forefront of ad servers (which it should be), it needs to be built in.

 

Thanks also for confirmation of the same theme above - seems to be important for people to allow main content to load first, and allow ads to load later when their Revive Adserver isn't so fast, as well as being easy to do without even something as relatively simple as bottom loading JS + CSS. It's definitely on my radar (if not definitely something I'm committing time to yet, because I really want to keep working on the documentation for a while to come for now.)

 

Last thought from me would be that if Revive Adserver is going to be at the forefront of ad servers, then we're going to need a great community to help us progress, because we won't be able to do it without that!

 

Thanks,

 

Andrew

Share this post


Link to post
Share on other sites
...

 

Thanks also for confirmation of the same theme above - seems to be important for people to allow main content to load first, and allow ads to load later when their Revive Adserver isn't so fast, as well as being easy to do without even something as relatively simple as bottom loading JS + CSS. It's definitely on my radar (if not definitely something I'm committing time to yet, because I really want to keep working on the documentation for a while to come for now.)

 

Last thought from me would be that if Revive Adserver is going to be at the forefront of ad servers, then we're going to need a great community to help us progress, because we won't be able to do it without that!

 

Thanks,

 

Andrew

Andrew, could you post a documentation as to deploying a JS + CSS that would be the "Revive Recommended Version" for an intermediary fix? A Step-by-step guide we ALL use when confronted with the issue, so all Revive users are working off the same solution. That would allow for better bug reports, trouble shooting, etc. Because right now it is fragmented, everyone is using a different solution and there is no common ground on the matter, so no real forward progress can be made.

I see that as an in between step that would still allow functionality in the current release, while development progresses on a true async solution.

Share this post


Link to post
Share on other sites

Hi andrewatfornax,

 

it would be really nice. I think the main feature would be:

 

- Allow async loading of banners/etc without them repeating at the same page

 

Why it is required:

 

- Speed reasons: content and page could be loaded faster.

 

From my experience with other ad servers, async ad sites load faster, and that increases usability quality, higher ranks in search engines. Definitely, async loading would be my personal top feature.

Share this post


Link to post
Share on other sites

My main issue is with the rendering of our website. When banners are stored locally, everything loads ultra fast. But when we have ad network banners, where network latency is added, the delay in loading the banners makes our page to load extremely slow, as the <div> tag won't render until the image is loaded.

 

Tried several different approaches, and so far I haven't come to a solution.

 

If you want to help me, my website is http://www.clubedohardware.com.br

Share this post


Link to post
Share on other sites

Just for my own sanity, though - given the complexity of async loading, and as Erik has mentioned, the risks it introduces in terms of cross-browser compatibility - why is it so important to you all (i.e. those +1ing above)? Why would async loading be any better than, say, putting your standard JS tags at the bottom of the page with appropriate CSS to position them?

 

The link you posted is broken.

 

I spent today the whole day playing with this idea. The problem here is that it only works with banners stored on our own servers. For some reason, banners coming from ad networks display blank, as if they somehow knew that we are trying to move/manipulate the banner. Maybe there is a better way to implement this idea than the one I was trying. Tips on this are welcome.

 

I use single-page call, so I was playing with the OA_show(); part. Examples other people posted are not for single-page calls, so I got lost on that particular discussion.

 

Thanks.

Share this post


Link to post
Share on other sites

I'm not expert in JS, but I  use very simple method, even without jquery. And it work fine for text, html, and other ad system code banners.

 

in the real slot I put only div:

<div id="OA_show_7"></div>

 

then single load config

 

<script type='text/javascript'><!--// <![CDATA[
var OA_zones = {
'my_zone_name' : 7
}
// ]]> --></script>
 

 

at the bottom of pages, avoid delay main content rendering

 

//initial request:

<script type='text/javascript' src='http://AD.SERVER>NAME/id=1&amp;charset=UTF-8'></script>

//insert banner code in hidden div

<div id="OA_container_zone_7" style="display:none;">
<script type='text/javascript'> 
OA_show('my_zone_name');
</script>
</div>
 
//copy rendered code to real, visible slot 
<script language="JavaScript">
function g_e(el) {return document.getElementById(el);}
if (g_e('OA_show_7')) g_e('OA_show_7').innerHTML=g_e('OA_container_zone_7').innerHTML;
</script>

Share this post


Link to post
Share on other sites

Hi gorman,

 

Thanks for the code. The problem is that it doesn't work with ad networks, at least with the ones I am using. They detect we are trying to load the banner on a hidden <div> and the banner isn't loaded. I believe this is a feature to avoid people loading hidden banners on a page without the intention to show them. See my post #33 above.

 

Thanks,

Gabriel.

Share this post


Link to post
Share on other sites

andrewatfornax, your tip actually works (End place tags & position with CSS). The problem is how to guess the positioning if we don't know the user's resolution, etc. I am playing with it right now, I am sure it must have an easy solution for that. Thanks.

 

I am figuring out that the problem is not with Revive itself, but with RTB ad networks that have a huge lag loading the banner, so everything is stuck until the banner is load. So, I don't think "fixing" Revive's code will fix this, as the issue is with the ad network code/banner loading... :/

Share this post


Link to post
Share on other sites

The problem is that it doesn't work with ad networks, at least with the ones I am using. 

Yes (

And another one: it may cause for double impressions. For one od external ad system I catch that it loaded twice, first on hidden div, and second on real

Share this post


Link to post
Share on other sites

look of what I was wrote  (www.inn.co.il, hit F12 and then write "Info"). I  am collecting banner info (ID of DIV, and zone) in JS and load & count all the banners in the same request.

 

This code works in the client perefectly, but the serverside is ugly so I could not contribute it.

Share this post


Link to post
Share on other sites

Hey guys,

 

just wanted to push this topic as I still think it's a major update. As I said in my previous post it seems that the guys from openx managed to do it :

 

http://docs.openx.com/ad_server/adtagguide_asynchjs.html

 

I would love to contribute, I made so many test but all of them had their cons so not suitable really. Anyone managed to find a work around for generating asynchronous loading?? 

 

If the Openx team managed to do it it seems that it should be do-able for revive too :)

 

Feedback welcome.

 

Cheers,

 

 

Share this post


Link to post
Share on other sites

Hello,

 

we would really like the feature also. We've tried a few ways but none of them really worked. We have a website that loads more than 20 banners on the homepage (long homepage for a large local site). Right now we use iframe to asynchronous load banners but it takes a lot of resources and time to load everything - also firefox does not like it and seems to wait for each iframe to load before it goes to the next...

 

still trying to figure out how to resolve this.

Share this post


Link to post
Share on other sites

I see that the async loading code uses the following format:

<!--/*
  *
  * Revive Adserver Asynchronous JS Tag
  * - Generated with Revive Adserver v3.2.0
  *
  */-->
 
<ins data-revive-zoneid="1" data-revive-id="7813b56809490348166b3701f410dbbc"></ins>
<script async src="//xxxxxxxxx.com/www/delivery/asyncjs.php"></script>

Share this post


Link to post
Share on other sites

My question is whether the hash data-revive-id is fixed or varies according to the zoneid, and if it varies, how to calculate it? Because our CMS generate the tags inserting the zoneid according to the location the user is loading from our website.

 

Thank you!

Share this post


Link to post
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...