the Forum

How to add email collection popup on my website

Posted on December 1, 2011 by Tony
Total Posts: 1  |  Join date: 12-01-11

Hi, Please help, I'm looking to add an email collection popup on my website. when a user lands on the site, a popup comes up and asks user to optin for newsletter, discounts, etc. Please advise the service and how to set this up Thanks!

Tags: There are no tags for this entry.

2 answers, add yours below

Posted on on December 1, 2011 at 11:24am
by Michael Rosario

Hi Tony,

As much as I LOVE LOVE LOVE popups... Here is a good solution using jQuery and FancyBox.

BTW, looks like fancy box is using a popup for their site to tell folks that Fancybox 2 is out.

For now, we'll use fancy box 1.

So first we need the following in our header:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" ></script>
<script type="text/javascript" src="scripts/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="scripts/fancybox/jquery.fancybox-1.3.4.css" /> 


We also need to add the following to the header, this will setup our fancy box:
<script type="text/javascript">
      $(
document).ready( function(){
          
$(".Popup").fancybox({ width500height600}).click();
      
});
</script> 


On the BODY, I would put the following:
<a href="form.html" class="Popup"></a>
<!-- 
Link to your form wether it's a different page, constant contact, etc.  --> 


For more options, like auto-resizing, scrollbars and cool neat tricks - refer to their API at
http://fancybox.net/api


 

Posted on on December 9, 2013 at 7:15pm
by Charlotte Barry

Thank you this is very helpful! Is there an available plugin to call the form or script only when a visitor has seen a certain number of pages of the website, or say only once per visit?

 
add your answers here
comments powered by Disqus