Pin It

Widgets

Facebook like Popup Before User Leave Our Website

This tutorial will help you to increase your fanpage and will reducing the bound rate on your blog.before i start maybe you want t see demo first so please go to this blog demo

FACEBOOK Like Popup Before User Leave Website 



1. Go to blogger dashboard -> Template --> Edit Html.

2. Find for </head> and place the following peace of code just above it.

<script type="text/javascript" src="http://kbeezie.com/jquery13.js"></script>
<script src="http://kbeezie.com/fancybox/jquery.fancybox-1.3.1.pack.js" type="text/javascript"></script>
<link rel="stylesheet" href="http://kbeezie.com/fancybox/jquery.fancybox-1.3.1.css" type="text/css" media="screen"/>
<script type="text/javascript">
 function PopIt() {
  $("a#trigger").trigger('click');
  window.onbeforeunload = UnPopIt;
  return "Would you like to join our fan page?";
 }
  function UnPopIt()  { /* nothing to return */ }
 $(document).ready(function() {
  window.onbeforeunload = PopIt;
  $("a#trigger").fancybox({
   'hideOnContentClick': false,
   'showCloseButton': false
  });
  $("a[id!=trigger]").click(function(){ window.onbeforeunload = UnPopIt; });
 });
</script>

thank to kbeezie create this code

3)Find <body> tag and place the following code just below it.


&lt;div id=&quot;fb-root&quot;&gt;&lt;/div&gt;
&lt;script&gt;(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = &quot;//connect.facebook.net/en_US/all.js#xfbml=1&amp;appId=146478122158914&quot;;
  fjs.parentNode.insertBefore(js, fjs);
}(document, &#39;script&#39;, &#39;facebook-jssdk&#39;));&lt;/script&gt;

<div style='display: none;'>
  <a href='#popup' id='trigger'/>
  <div id='popup' style='width: 250px; height: 300px;'>
   <p><div class='fb-like-box' data-header='false' data-height='300' data-href='http://www.facebook.com/ceritaapakah' data-show-faces='true' data-stream='false' data-width='250'/></p>
  </div>
 </div>

4)Please change all red text to your information also you can paste all blue code using facebook like box java sdk went to create your facebook like box

5)save your template and done now you will see popup messages went you close your website also you can see facebook like box
thank Q

{ 10 comments... go to Comment Box }

Anonymous said...

Τhesе are гeallу gгeat ideas in cοncеrning
blogging. You have touched ѕome good thіngs here.
Αny way kеeρ uρ wгintіng.
Also see my website - Second Hand Mobile Phones

Anonymous said...

Great goоds from you, man. I have understand yοur stuff pгior tо and you're simply extremely fantastic. I actually like what you have obtained right here, really like what you are saying and the way in which by which you are saying it. You're maκing it entertaining and
you continue to take care оf to stay it wise. I cant
wait tο read muсh more from you.

Тhat is асtuallу a tremendous ωebsite.
Here is my webpage : Payday Loan

Keashav Chawla said...

Could you provide some help in setting this up! Im facing some problems !!

admin said...

keashav chawla i think maybe your problem in facebook sdk were in blue color in my tutorial.i think to solve you can copy facebook sdk went you create facebook like box after you copy please use parse html your facebook sdk and then you replace the blue color with your own sdk... i hope it will help you thank for your comment

admin said...

keashav chawla i think maybe your problem in facebook sdk were in blue color in my tutorial.i think to solve you can copy facebook sdk went you create facebook like box after you copy please use parse html to your facebook sdk and then you replace the blue color with your own sdk... i hope it will help thank for your comment

Anonymous said...

many parents, because of difficulties beyond their ascendance, will alienation of tenderness as the rationality for sequestration if Fornication
was the campaign.

Here is my site; Sequestration

Unknown said...

Hey Admin,

When people close my blog, a pop up appears saying, "Would You Like To Join Our Fanpage?

Are You Sure you want to Leave this page.

[OPTIONS ARE]: Leave This Page & Share This Page."

Where the hell Like Box appears?

Reply Soon!

Regards
Rishabh Anand
Owner/Developer/Founder
WikiGear
The Player's Paradi

Anonymous said...

Hello my loved one! I wish to say that this article is
amazing, nice written and come with approximately all significant infos.
I'd like to see more posts like this .

Look into my site: Michael Kors Outlet

Anonymous said...

I'm now not sure where you're getting your info, but great topic.
I must spend a while learning more or figuring
out more. Thank you for fantastic information I used to be in search of this info for my mission.


Feel free to visit my homepage http://slc-wireless.com

Anonymous said...

I am curious to find out what blog system you are using?
I'm having some small security issues with my latest website and I would like to find something more safeguarded. Do you have any recommendations?

Also visit my homepage :: Air Max

Add your comment

 
Yahoo Messenger
Send Me IM!
Google Plus
Add Me To Your Circle!
Twitter
Follow Me!
Facebook
Add My Facebook
copyright 2012© -