Logo of RobustHost, developer of high quality webmaster tools.
Home About Us Contact Us Support Download Products
DynAds Basic banner ad rotation and tracking script
DynAds
Main Page
Features
Demo & Test
Documents
F.A.Q.
 
Order Online
 
Related Products
DynAds Pro
 
Testimonials
 

Sample Testimonial
Thank you for answering me so quickly and for your kindness and professionalism. The script is very very good. I am very satisfied.
C. Bosque, franceliens.com More...

Affiliates

Displaying Pop-Up Ads Efficiently with DynAds

Have you ever used pop-up or pop-under ads on your website or for your own advertisements? Are you one of those that hates popping ads? Or maybe you are one of those lucky guys that made a fortune with pop-up ad campaigns. There have been so many talks on pop-up ads: Are they efficient? Is it ethical to use pop-ups? Why some visitors hate them? Are pop-unders are better than pop-ups?... Regardless of your idea and feeling about the pop-up ads, please read on. Most probably this article will change your looking to pop-ups.

Pop-up ad is a tool like double edged sword. If you know how to use it, you can surely benefit from it. But, you might hurt yourself easily, if you are not skilled with it. In the next paragraphs, we will analyze the pop-up ads, and introduce instant pop-up ad concept which is only possible with DynAds. In addition, we will show how to control the display frequency of pop-ups.

Historical Reasoning. When pop-ups were first introduced to the Internet community several years ago, visitors did not have any idea what would happen next after they saw a popping window. So, they usually waited until all the page loaded to the browser and they read the content of the page trying to get the idea and purpose of the popping window.

Soon after, the learning curve was completed. Almost everybody learned what a pop-up is. And with the help of aggressive pop-up showers, visitors started to close windows before waiting for the content to download, which is not good for advertisers and webmasters. There is not much you can do to decrease the load time of a page. Most Internet users are still on dial-up connections. Temporarily, your site may be too busy to deliver a page, or there may be some transient network errors. None of these are under your control.

Then the brilliant idea of pop-unders came into the arena to solve the problem of closing windows before even the page is loaded to the window. Pop-under ads open behind the current browser window and if you are luck enough the visitor does not notice it until the whole ad loads. This way, pop-unders increase the visibility of the ads. However, visitors are learning everyday and even pop-unders are closed before the content is displayed. Another bad thing is that the correlation between your main content and the content in pop-under is lost since the pop-under is hiding behind the main window and will be noticed after the main window is closed. After all, why hide your ad?

Surveys among the Internet users show that, most users are not bothered by infrequent pop-ups shown once in several days. So, two important result from this discussion are

  • Show your content as fast as possible
  • Control the display frequency of pop-ups per visitor basis
  • Instant Pop-Up Ads

    With DynAds, you can create instant pop-ups which show the ads instantly with zero window load time. Since your ad is there already, visitor will definitely see your ad even if he/she attempts to close the window immediately. Surely this is the best you can expect from a pop-up ad.

    Say you are displaying ads pulled randomly from the ad group named PopUpAds in a pop-up window having display position name MainPop. Also assume that DynAds is installed in http://YourDomain.com/cgi-bin/dads/. Then your normal pop-up window code would be like the following which opens a new window that loads the randomly selected ad.

    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!--
      var pupMainPop = window.open("http://YourDomain.com/cgi-bin/dads/ad.pl" +
    "?pos=MainPop&agn=PopUpAds&sel=rnd&dsp=frm",
    "pupMainPop", "SCROLLBARS=No, WIDTH=300, HEIGHT=250") ;
    //-->
    </script>

    In order to make the above pop-up ad an instant pop-up, use the following code snippet that loads the ad into the browser first and then displays it in a pop-up. The result is a pop-up window that opens with a content in it. Place the code snippet near the end of your page, so that it will not delay the displaying of your page.

    <!-- Retrieve the ad from DynAds server -->
    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="http://YourDomain.com/cgi-bin/dads/ad.pl?pos=MainPop&agn=PopUpAds&sel=rnd&dsp=ajs">
    </script>

    <!-- The ad is loaded. Now, show it in a pop-up window -->
    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!--
      var pupMainPop = window.open("", "pupMainPop", "SCROLLBARS=No, WIDTH=300, HEIGHT=250") ;
      pupMainPop.document.write("<HTML><BODY>" + MainPop[0] + "</BODY></HTML>") ;
    //-->
    </script>

    The above code will work very fine for ad copies having more text content than images. If, on the other hand, the ad content is full of images, the above code will not help much. This is because the images still need to be loaded after the pop-up window is displayed. In order to force images to load to the browser irrespective of the content, use the code below. We put the retrieved ad into an invisible layer on the page and wait for a predetermined amount of time for the browser to load images of the ad. After that wait period, the pop-up is displayed. Since most of the images (if not all) are already loaded to the browser, there will be no image load delay in the pop-up window.

    <!-- Retrieve the ad from DynAds server -->
    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="http://YourDomain.com/cgi-bin/dads/ad.pl?pos=MainPop&agn=PopUpAds&sel=rnd&dsp=ajs">
    </script>

    <!-- The ad is loaded. Now, show it in a pop-up window -->
    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!--
      document.write("<DIV STYLE='visibility:hidden;overflow:hidden;width:1;height:1'>" + MainPop[0] + "</DIV>") ;

      function displayPopUp(data) {
         var wpop = window.open("", "wpop", "SCROLLBARS=No, WIDTH=300, HEIGHT=250") ;
         wpop.document.write("<HTML><BODY>" + data + "</BODY></HTML>") ;
      }
      // Wait 5 seconds and then pop the window
      setTimeout("displayPopUp(MainPop[0]);", 5000) ;
    //-->
    </script>

    Controlling the frequency of Pop-Ups

    You can limit the frequency of the pop-ups by using user cookies. Use the following java script code snippet to limit the display of a pop-up window say once in 30 days.

    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!--
      function setCookie (cname, cval, cdur) {
        var expires = new Date() ;
        expires.setTime(expires.getTime() + cdur*1000) ;
        document.cookie = cname + "=" + cval + "; path=/; expires=" + expires.toGMTString() ;
      }
      function chkCookie (cname) {
        var rcookie = document.cookie ;
        var sti = rcookie.indexOf(cname + "=") ;
        return (sti != -1) ;
      }

      // The name of the cookie for this pop-up
      var popupcname = "PopUpCookieName" ;
      // The duration of the cookie in seconds
      var popupcdur = 30 *24*60*60 ;
      // Check if the popup was shown before
      if (!chkCookie(popupcname)) {

        // Put your pop-up display code here

        // Set a cookie to mark this pop-up
        setCookie(popupcname, 'x', popupcdur) ;
      }
    //-->
    </script>


    Copyright © 2003, RobustHost.com. All Rights Reserved.