Simple OTO and Countdown Timer

You may remember my Countdown script. Now we can combine it with the Simple OTO script to show a Countdown timer only once.

There are 2 variants of the Countdown script. You can use it with a popup window and at your regular page without a popup window.
Here is a recipe to add the Simple OTO script to both variants.

OTO’s popup window with a Countdown Timer

Insert the OTO function code into your main web page.
A. Select all of the code in the box below then copy to clipboard (Ctrl+c) then paste (Ctrl+v) it between the <head> and </head> tags of your HTML source code.

 
Use the oto function to open your OTO’s popup window if only the user hasn’t seen it before.
B. Insert a code like below into the <body> tag of your name page.
<body onload=”if ( oto(’SpecialOffer’) ) window.open(’SpecialOffer.html’);”>

 
Insert the Countdown Timer code into your SpecialOffer.html popup page.
C. Select all of the text in box below then copy to clipboard (Ctrl+c) then paste (Ctrl+v) it between the <head> and </head> tag of your PopUp-Window’s HTML source code.

 
Insert a Timer code into your popup page.
D. Select all of the text in the second box below then copy to clipboard (Ctrl+c), then paste (Ctrl+v) the HTML code you’ve just selected into the source code of your PopUp page anywhere between the <body> and </body> tags. The position you choose is where counter will appear.

OTO with a Countdown Timer at your regular page

Insert the OTO function code into your main web page like for the first variant.
A. Select all of the code in the box below then copy to clipboard (Ctrl+c) then paste (Ctrl+v) it between the <head> and </head> tags of your HTML source code.

 
Insert the Countdown Timer code into your main page too.
B. Select all of the text in box below then copy to clipboard (Ctrl+c) then paste (Ctrl+v) it between the <head> and </head> tag of your HTML source code.

 
Insert a Timer code into your main page.
C. Select all of the text in the second box below then copy to clipboard (Ctrl+c), then paste (Ctrl+v) the HTML code you’ve just selected into the source code of page anywhere between the <body> and </body> tags. The position you choose is where counter will appear.

This code snippet below plays with OTO and Timer:
  if (oto(’SpecialOffer2′)) goCountdown(”countdown”, 30);
  else stopCountdown(”countdown”);

Click this button to start the sample below

 

Respond within the next 10 seconds for this extra bonus

 

by Michel Komarov, © Copyright 2006. iCoder.com

 

Share in social bookmarking:These icons link to social bookmarking sites where readers can share and discover new web pages.  digg del.icio.us BlinkList Reddit NewsVine YahooMyWeb co.mments

Related Articles:

15 Responses to “Simple OTO and Countdown Timer”

  1. gregl Says:

    What code would I use if I wanted to show an OTO page after a signup from an optin form? The OTO page would be like a thank-you page called from the form after the name and email is submitted. It would not be a popup. Thanks.

    Greg

  2. michel Says:

    Hi Greg,

    If you have a thank-you page called from the form after submitting
    you can add a js-code like below into your thank-you page.

    <html>
    <head>
    <title>Thank-you page</title>
    <script type="text/javascript">
    <!--
    function oto(otoName) {
     var cookie = "oto"+escape(otoName)+"=";
     if (0 > document.cookie.indexOf(cookie)) {
      var d = new Date();
      d.setMonth(d.getMonth() + 120);
      document.cookie = cookie+"1; expires="
       +d.toGMTString()+"; path=/;";
      return true;
     } else return false;
    }
    if (oto("SpecialOffer1"))
     window.location.assign("http://YourSite.com/oto-page.html");
    //-->
    </script>
    </head>
    <body>
    THANK YOU...
    </body>
    </html>

    This code redirects the thank-you page to your oto-page the same way as the “Exit Page Redirect” script works
    http://askmichel.icoder.com/2006/06/26/exit-page-redirect/

    I hope this helps.
    Michel

  3. ILUSNST Says:

    Hi Michael,

    Great scripting! Thanks for making these tools available to neophytes like myself.

    Q: I love the OTO concept coupled with the timer. I’d like to have an offer “expire” on a certain date and time. Can I couple your OTO script with your son’s online countdown timer? (http://blog.go-test.net/2006/07/18/online-countdown-timer/)

    What I’d like to end up with is “You have [DD/HH/MM/SS] remaining to click the link below.”
    And, on expiration of the time, have the link be replaced with a different url and the text reflect that the offer is over: “This offer has ended but, by clicking the link below, you can take advantage of blah, blah, blah.”

    Again, thanks to you both for your time and creativity on these excellent scripts!

    - Steve Johnson
    www.GrandIllusions.com

  4. money-fx.com » OTO pages Says:

    […] Gaining in popularity is the OTO or one time offer page.  It contains scripts that make it available only once as to entice the buyer to buy now or lose out.  It is still fairly new and I don’t see them going anywhere anytime soon.  If you decide to use this tactic beware that you may drive people from your site.  If, however, you are driving targeted traffic to your site, this selling tactic may prove to be successful.  To see an example of this code,  click here. […]

  5. money-fx.com » OTO pages Says:

    […] Gaining in popularity is the OTO or one time offer page.  It contains scripts that make it available only once as to entice the buyer to buy now or lose out.  It is still fairly new and I don’t see them going anywhere anytime soon.  If you decide to use this tactic beware that you may drive people from your site.  If, however, you are driving targeted traffic to your site, this selling tactic may prove to be successful.  To see an example of this code, follow this link:  http://askmichel.icoder.com/2006/08/07/simple-oto-and-countdown-timer  […]

  6. » MoneyFX.com Says:

    […] Gaining in popularity is the OTO or one time offer page.  It contains scripts that make it available only once as to entice the buyer to buy now or lose out.  It is still fairly new and I don’t see them going anywhere anytime soon.  If you decide to use this tactic beware that you may drive people from your site.  If, however, you are driving targeted traffic to your site, this selling tactic may prove to be successful.  To see an example of this code, follow this link:  OTO page!   « Welcome! |   […]

  7. OTO - One Time Offer - Black Hat Forum Says:

    […] Re: OTO - One Time Offer Basically there is no need neither for software, nor for some special script. You can make with simple static pages a fake OTO which says it is OTO, but in reality user can navigate to find it again. At least user will be happy that he didn’t lost the chance, and eventually he will use it to buy. And if he doesn’t buy, then who cares? OTO has been so much used and abused, that personally I don’t believe in the "unique opportunity" which goes away. And usually, after bypassing the OTO, I encounter again the same - or better - discount offer or special upgrade ofer as "one more chance" later, on the membership page. However if you really would like to have a genuine One Time Offer, I mean the OTO is intended to be really unique, and you have a good copy which gives a really reasonable and believable reason for the uniqueness of the One Time Offer, then you can simply google for [free php "one time offer" OR "OTO"], just remove the brackets, and you may choose some free goodies. For instance in less than one minute I found on Google: and http://askmichel.icoder.com/2006/08/…timer/#more-24 Bingo! Just chose which script you like better, copy and paste it in your web-page code and you have what you desired. I don’t know personally Michel Komarov, the author of these scripts, but from reading his articles, I have the impression, that he is a good authority on this scripting subject. You may find worth of browsing his site for more goodies to be used on marketing pages. Regards, Art Swerdstone P.S. If anyone feels too hard or boring using google search, I may offer one-two hours per day from my time for organic search on Google for just $50 hourly rate. Just PM me. […]

  8. blogman Says:

    Michel,
    I like the simplicity of your scripts. How does a person disable a order link if the count down has reached zero?
    Thanks,
    Blogman

  9. blogman Says:

    Or as an option to blocking the order link - when the timer reaches zero - the page is redirected to another page - or if they come back later - it is also redirected to another page that might be even better
    Thanks Again
    Blogman

  10. michel Says:

    Hi Blogman,

    This scripts shows a timer and hides the offer with your link after the timer reaches zero. It works with cookie, so the offer wouldn’t appear when they come back later to the offer page.
    But the script can’t manage another page your link directs to.
    You need another script on these landing (order) page.

    In case the order page at the same site as the offer page, you could use a code to check the same cookie. Try the code below:

    <script type="text/javascript">
    <!--
    function oto(otoName) {
      var cookie = "oto"+escape(otoName)+"=";
      if (0 > document.cookie.indexOf(cookie)) return true;
      else return false;
    }

    if ( ! oto("YourSpecialOfferName"))
      window.location.assign("http://YourSite.com/redirect-to-expire.html");

    //-->
    </script>

    Place this code in the <head></head> section of your page.

    Hope this helps.
    Michel

  11. dudu08 Says:

    If i want to set countdown start in hours like “1 hours 30 minutes 30 second” how to do that?

  12. blueston Says:

    Hi Michel,

    I love your scripts. This will help me very much. I have implemented a 2 hour countdown. It works perfectly, unless the customer refreshes the page while the countdown has not finished.

    Since the cookie has already been set, it shows the “Time is gone” message.

    Any chance you can give me some insight on how to show the current countdown even if the visitor refreshes or closes the page and returns later?

    Thanks in advance - Mark

  13. blueston Says:

    Hi Michel,

    Your scripts are great. I have a 2 hour countdown set. Unfortunately, if the user refreshes the page the script automatically reads “Time is gone”.

    Any chance you can give me some insight on how to keep the current state of the countdown if the visitor refreshes or leaves and returns to the same page.

    I am trying to give the visitor a 2 hour total even it takes several trips to the page.

    Thanks - Mark

  14. hEll0_w0lrd Says:

    very cool & good code, thank you very much for sharing.

    Can you share this code on my JavaScript library?

    Awaiting your response. Thank

  15. Levcomm Says:

    Michel:

    I tried to install the Simple Script on my iMac, and it didn’t work. Could it be because it is a Mac? Can this work with a Mac?

    If not, can you recommend an OTO script that does work on a Mac?

    Thanx

Got a question?   Leave a Reply

You must be logged in to post a comment.