1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Looking for script to force visitors to stay longer on a webpage

Discussion in 'Scripting' started by jasbirkhanna, Dec 17, 2016.

  1. jasbirkhanna

    jasbirkhanna Newbie

    Joined:
    Sep 22, 2016
    Messages:
    5
    Likes Received:
    0
    Gender:
    Male
    Hi,

    Is there any script out there which can make a visitor stay longer on a webpage? I'm sending PPV traffic to my site but according to Similarweb, the avarage visitor time is only about 3 seconds.

    Just need for this PPV traffic and not normal regular traffic to stay on for longer.

    Regards
     
  2. mailicreate

    mailicreate Junior Member

    Joined:
    Jan 17, 2015
    Messages:
    128
    Likes Received:
    28
    Use some simple JavaScript as it works with all web languages. Here is the translation of the syntax - google to find the code for each of the below:

    If webpage navigation changes to different domain** then alert ("do you want to leave this page", yes, cancel)
    if yes redirect to your page (like different page on the same domain)
    if cancel redirect to your page (like different page on the same domain)

    This should create a loop which will buy you lot of visitor time. The drawbacks of this you will get visitors pissed off.
     
  3. dhia27

    dhia27 Jr. VIP Jr. VIP

    Joined:
    Jan 26, 2016
    Messages:
    530
    Likes Received:
    231
    There is a script called "Content is King" !!
     
  4. jasbirkhanna

    jasbirkhanna Newbie

    Joined:
    Sep 22, 2016
    Messages:
    5
    Likes Received:
    0
    Gender:
    Male
    Hi Mailicreate,

    Many thanks for that. I'll give it a go.
     
  5. BJ@008

    [email protected] Jr. VIP Jr. VIP

    Joined:
    May 8, 2012
    Messages:
    143
    Likes Received:
    28
    Location:
    Republic Of Gamers
    @iasbirkhanna Hope its not too late try looking into javascript and you might want to use setinvertal function and different even listeners to identify and
    intercept the user action and based upon where it is exit operation or redirct to your own site you should be able to acheive
    what you need.
     
  6. jasbirkhanna

    jasbirkhanna Newbie

    Joined:
    Sep 22, 2016
    Messages:
    5
    Likes Received:
    0
    Gender:
    Male
    Many thanks for that. Have you a script that does that? I'll pay. Also want another script which forces the user to click on a banner and drops a cookie at the same time.

    Regards
     
  7. Skyebug77

    Skyebug77 Jr. VIP Jr. VIP

    Joined:
    Mar 22, 2012
    Messages:
    2,205
    Likes Received:
    1,616
    Occupation:
    Marketing
    Location:
    Portland,Or
    use layered pop ups.....I consider it a must have. Best $19 youll spend on your site.
     
    • Thanks Thanks x 2
  8. BJ@008

    [email protected] Jr. VIP Jr. VIP

    Joined:
    May 8, 2012
    Messages:
    143
    Likes Received:
    28
    Location:
    Republic Of Gamers
    @Skyebug77 It does looks interesting and it looks like it does what OP wants he can purchase and it will be reusable as well.

    It has two variants both wordpress and non wordpress :)
     
  9. Zwielicht

    Zwielicht Moderator Staff Member Moderator Jr. VIP

    Joined:
    Aug 31, 2013
    Messages:
    7,732
    Likes Received:
    13,899
    Gender:
    Male
    Occupation:
    Death
    Location:
    Riverside, California
    Home Page:
    Yeah, the script below will display a popup if a user tries to exit or refresh the page.
    Code:
    <script language="javascript" type="text/javascript">
    window.onbeforeunload = function()
    {
        return "Baby Come Back! You Can Blame It All On Me! I Was Wrong, And I Just Can't Live Without You!";
    }
    </script>
    
     
  10. gimme4free

    gimme4free Executive VIP Jr. VIP Premium Member

    Joined:
    Oct 22, 2008
    Messages:
    1,930
    Likes Received:
    1,945
    Home Page:
    If you are allowed to iframe your own page you could add a flash file that uses a lot of memory / crash the browser. Not very nice for them but it will keep them there for a while as it loads.
     
  11. DropBock

    DropBock Newbie

    Joined:
    Dec 28, 2015
    Messages:
    13
    Likes Received:
    6
    tell them there will be a suprise if they stay for at least five minutes.
     
  12. Triggakb24

    Triggakb24 Newbie

    Joined:
    Mar 19, 2017
    Messages:
    15
    Likes Received:
    1
    Gender:
    Male
    I always wondered why people did this on their website.