What Would Seth Godin Do with AdBlock

April 27, 2007 · 1 comment

Seth Godin is a marketing genius. His writing style is unimitable. Ultimately everything boils down to excellent copywriting.  He once remarked about using the power of cookies to greet the returning visitors. This resulted in the making of a WWSGD wordpress plugin.

Taking cues from What Would Seth Godin Do and a WebTemp script, I have created a modified script to detect AdBlock and then show an WWSGD type RSS subscription message.

You may not be monetizing, still increasing feed count should make you happy!

Let someone know me the success with Adbrite/Bidvertiser scripts as inner HTML ;)

Code:

  1. Have your adsense script inside a <DIV id=”adsense”> tag.
  2. Paste the following script just above the </body> tag. In my case it was in the footer.php file.

<script type=”text/javascript”>
setTimeout(‘check_ads()’, 1000);
function check_ads() {
var blocked = false;
var e = document.getElementsByTagName(“iframe”);
for (var i = 0; i < e.length; i++)
if ((e[i].src.indexOf(“googlesyndication.com”) > -1) &&
(e[i].setAttribute && (e[i].style.visibility == “hidden” ||
e[i].style.display == “none”))) blocked = true;
if (!window.opera && (!window.google_last_modified_time ||
!google_last_modified_time)) blocked = true;
if ((e.length == 0) || blocked) {
var s = “<p style=’border:thin dotted black; padding:3mm;’>Subscribe to my <a href=’http://vinodlive.com/feed/’>RSS feed</a>. Thanks for visiting!</p>”
document.getElementById(“adsense”).innerHTML = s;
}
}
</script>

Don’t forget to change the feed address to yours.

{ 1 comment… read it below or add one }

Majida March 2, 2009 at 3:35 am

thanks for the info on the scripts.

Reply

Leave a Comment

 

Previous post:

Next post: