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

[jQuery] Save $2,195/month and keep bounce traffic

Discussion in 'HTML & JavaScript' started by GoForJacob, Jun 6, 2013.

  1. GoForJacob

    GoForJacob Junior Member

    Joined:
    Apr 2, 2013
    Messages:
    182
    Likes Received:
    177
    If you're like me, you're always trying to figure out how to convert more of your traffic. After looking at a lot of the KISS websites and Neil Patel's personal site for consultation, I became obsessed with Bounce Exchange, only to be deterred by the $2,195/month price tag (cheapest plan).

    Their software is ridiculously advanced, but I threw together a cheaper alternative that functions similarly. Enjoy.

    First thing we want to do is declare the function, then set the cookie and check if it exists. Simple as 1-2-3.

    Code:
    function AvoidBounce() {
        jQuery("body").mouseleave(function() {
            if ( jQuery('#avoid-bounce').data('shown') != true ) {
                jQuery('#avoid-bounce').data('shown', true).show();
            }
        });
        
        jQuery('#avoid-bounce .close-campaign').click(function() {
            jQuery('#avoid-bounce').hide();
            return false;
        });
    }
    
    
    jQuery(document).ready(function(){
        var visited = jQuery.cookie('visited');
        if (visited == 'yes') {
            return false;
        } else {
            AvoidBounce();
        }
        jQuery.cookie('visited', 'yes', { expires: 7 });
    });
    
    You'll need jQuery.cookie.js, too. Also, I realize the code is ugly. I threw it together in about 30 minutes. I think I'm going to continue to refine this and make it more like Bounce Exchange
     
    • Thanks Thanks x 7
    Last edited: Jun 6, 2013
  2. Panther28

    Panther28 Elite Member

    Joined:
    May 2, 2010
    Messages:
    2,268
    Likes Received:
    3,405
    Occupation:
    Internet.
    Location:
    Internet.
    • Thanks Thanks x 1
  3. GoForJacob

    GoForJacob Junior Member

    Joined:
    Apr 2, 2013
    Messages:
    182
    Likes Received:
    177
    Hey there Panther,

    I wasn't aware of that. The difference is that my script that I just posted is to fire an event when the visitor goes to leave the page. Whether it's to the address bar, back button, etc. the event fires a popup that offers a free PDF if they enter their name and email.

    Then we set a cookie to make sure that it does fire every time they visit the site or change a page, so it doesn't become annoying.

    Where I factor in affecting bounce rate, is that you'll get a couple more leads than normal. For example, say 1,000 people go to your site. 100 of them want to leave after scanning the page, but when they go to the address bar or to click the back button, they're prompted with an offer to get something in return for their email address and name.

    Granted, not all of them will fill it out, but even if 1 or 2 do, that's 1 or 2 more leads than you would have had beforehand.

    I hope that was adequate enough.

    Thank you! :)
     
  4. Panther28

    Panther28 Elite Member

    Joined:
    May 2, 2010
    Messages:
    2,268
    Likes Received:
    3,405
    Occupation:
    Internet.
    Location:
    Internet.
    Ah thats quite good mate, you might want to rename the post to say that its an exit popup script, there is more chance people will be searching for that, and should find your script.

    Repped.
     
    • Thanks Thanks x 1
  5. oozyluce

    oozyluce Regular Member

    Joined:
    Jan 26, 2013
    Messages:
    277
    Likes Received:
    231
    Occupation:
    IT Coordinator, Senior Network Administrator
    Location:
    http://www.gaben.tv/
    Home Page:
    What he said. I understand that this script has the potential to decrease your bounce rate, but by the title's name i was more expecting a something along an AJAX query hack that would load another page of your website after a simulated click, or something along the line :)

    Your code isn't ugly btw don't underestimate your skills!
     
    • Thanks Thanks x 4
  6. GoForJacob

    GoForJacob Junior Member

    Joined:
    Apr 2, 2013
    Messages:
    182
    Likes Received:
    177
    Thank you both so much! Sadly, I can't seem to change the thread title. Perhaps I waited too long?

    @OozyLuce, I appreciate it. I've been programming for roughly 10 years so I feel as though it could be a bit more polished. Haha.

    I'll have a working demo on my site tomorrow, as long as the mods wouldn't mind me posting a link. If that would be problematic, I could always put up a dummy site with an example, though. I just believe the one on my site will be better due to the amount of design, testing, and work that's gone into it, so people can really see what can be achieved with this.
     
  7. Gophering

    Gophering Junior Member Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    115
    Likes Received:
    279
    Occupation:
    Unemployed
    Location:
    EU
    Hey OP,

    very nice share! You say you'd like to refine the script a little, just a few suggestions if you don't mind.
    You don't have to check truth explicitly in JS, so stuff like

    can be shortened to just

    Same goes for negative truth, it can be written as

    Your onload codeblock could be expressed as

    Hope this helps a little.
     
  8. GoForJacob

    GoForJacob Junior Member

    Joined:
    Apr 2, 2013
    Messages:
    182
    Likes Received:
    177
    Very nice contribution! Thank you Gophering. Right now I'm adding mouse tracking and time spent on site to it. After that I'll continue to clean the code a bit.

    Again, thank you Gophering!
     
  9. MrBlue

    MrBlue Senior Member

    Joined:
    Dec 18, 2009
    Messages:
    950
    Likes Received:
    662
    Occupation:
    Web/Bot Developer
    Take a look at heatmap.js. You could certainly gleam some insight from that code.

    Code:
    http://www.patrick-wied.at/static/heatmapjs/example-heatmap-mousemove.html
     
    • Thanks Thanks x 1
  10. GoForJacob

    GoForJacob Junior Member

    Joined:
    Apr 2, 2013
    Messages:
    182
    Likes Received:
    177
    I totally forgot about Heatmap! I'm actually about to launch an SaaS insight company (built entirely on RoR/PostgreSQL/Faye) which I'm thinking about including a confetti or heatmap product in. That could be beneficial. Thank you!
     
  11. gautamm

    gautamm Newbie

    Joined:
    Aug 16, 2013
    Messages:
    1
    Likes Received:
    0
    Hi Jacob,

    It's great to see you working on this. Are you planning on posting the revised script on this thread? Would love to test and tweak it, if possible.

    Regards,
    Gautamm
     
  12. seansteez

    seansteez Newbie

    Joined:
    Feb 7, 2010
    Messages:
    2
    Likes Received:
    0
    If anyone here is interested in a SaaS product that does this for a third of the cost, please shoot me a DM. I have the perfect solution for you!
     
  13. GoForJacob

    GoForJacob Junior Member

    Joined:
    Apr 2, 2013
    Messages:
    182
    Likes Received:
    177
    Are you fucking retarded? This says "Save $2,195" and it's a free method.

    Go spam somewhere else.
     
  14. thedorf

    thedorf Senior Member

    Joined:
    Oct 1, 2008
    Messages:
    1,193
    Likes Received:
    700
    Occupation:
    what? I gotta have a job?
    Location:
    BHW - Where else?
    Hey OP I'd like to see the demo you put up - I am having trouble getting the code to do anything.
     
  15. syedbalkhi

    syedbalkhi Newbie

    Joined:
    Oct 12, 2013
    Messages:
    1
    Likes Received:
    0
    I'm the founder of OptinMonster a WordPress plugin that allows you to do practically what BounceExchange does for a fraction of a price. Check it out if anyone is interested :)
     
  16. jr_sci

    jr_sci Senior Member

    Joined:
    Jan 30, 2010
    Messages:
    857
    Likes Received:
    686
    Occupation:
    CTO at Tiny Piglet Publishing, Bestselling Author
    Home Page:
    I am pretty happy with wpleadmagnet with it's 1 time cost.
     
  17. GoForJacob

    GoForJacob Junior Member

    Joined:
    Apr 2, 2013
    Messages:
    182
    Likes Received:
    177
    Does it include mouse tracking? BounceExchange is a completely different animal of its own. I've gotten fairly close to reproducing it 100% though.
     
  18. marketbizpro

    marketbizpro Newbie

    Joined:
    Jan 31, 2014
    Messages:
    1
    Likes Received:
    0
    I am watching this closely! Would you post your finished code here?
     
  19. BloodyNinja

    BloodyNinja Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 28, 2013
    Messages:
    445
    Likes Received:
    277
    Location:
    Deeptown
    Does your script require only JQuery and JQueryCookie to run or something else? Thanks
     
  20. ethiccash

    ethiccash Newbie

    Joined:
    Dec 14, 2007
    Messages:
    6
    Likes Received:
    2
    It looks like you're moving forward. Any idea if you will share or sell the script. Pls PM me as I am interested to run it for my websites.
    thx