<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BizBlog &#187; hide adsense</title>
	<atom:link href="http://biznz.org/tag/hide-adsense/feed/" rel="self" type="application/rss+xml" />
	<link>http://biznz.org</link>
	<description>Monetize Your Site………</description>
	<lastBuildDate>Thu, 25 Aug 2011 11:14:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>How To Hide Adsense From Social Traffic</title>
		<link>http://biznz.org/monetize-your-site/how-to-hide-adsense-from-social-traffic/</link>
		<comments>http://biznz.org/monetize-your-site/how-to-hide-adsense-from-social-traffic/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 16:17:18 +0000</pubDate>
		<dc:creator>Rhys</dc:creator>
				<category><![CDATA[Monetize Your Site]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Adsense CTR]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Grizzly Brears]]></category>
		<category><![CDATA[hide adsense]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[make money online]]></category>
		<category><![CDATA[monetize]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[search engines]]></category>
		<category><![CDATA[social traffic]]></category>
		<category><![CDATA[Vic Franqui]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://biznz.org/?p=33</guid>
		<description><![CDATA[How To Hide Adsense From Social Traffic Read on to find out How To Hide Adsense From Social Traffic from Stumbledupon, Digg, Technorati, Etc. The secret is to add a little JavaScript around your Ads, so that they will only &#8230; <a href="http://biznz.org/monetize-your-site/how-to-hide-adsense-from-social-traffic/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h1>How To Hide Adsense From Social Traffic</h1>
<p>Read on to find out How To Hide Adsense From Social Traffic from Stumbledupon, Digg, Technorati, Etc. The secret is to add a little JavaScript around your Ads, so that they will <strong>only be displayed if the visitor comes from a search engine</strong>. To see this in action, visit this site via search engine and an Adsense ad will replace the banner on top of this post</p>
<h1><strong>Update &#8211; PHP Alternative</strong></h1>
<ul>
<li>If you prefer to code this trick using PHP then do this:</li>
</ul>
<p>Insert this code where you want the ad to appear<br />
<code>&lt;?php include ('incl_adsense.php'); ?&gt;</code></p>
<p>- where incl_adsense is this file:<br />
<code><br />
&lt;?php<br />
function searchengine(){<br />
$ref = $_SERVER['HTTP_REFERER'];<br />
$SE = array('/search?', 'images.google.', 'web.info.com', 'search.', 'del.icio.us/search', 'soso.com', '/search/', '.yahoo.');<br />
foreach ($SE as $source) {<br />
if (strpos($ref,$source)!==false) return true;<br />
}<br />
return false;<br />
}<br />
if (function_exists('searchengine')) {<br />
if (searchengine()) {<br />
echo "&lt;script type=\"text/javascript\"&gt;&lt;!--<br />
google_ad_client = \"pub-yourcodexxxxxxx\";<br />
/* Banner468x60 11/05 */<br />
google_ad_slot = \"xxxxxxx0212\";<br />
google_ad_width = 468;<br />
google_ad_height = 60;<br />
//--&amp;rt;<br />
&lt;/script&gt;<br />
&lt;script type=\"text/javascript\"<br />
src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"&gt;<br />
&lt;/script&gt;";<br />
} }<br />
?&gt;</code></p>
<ul>
<li> <strong>Save Bandwidth:</strong></li>
</ul>
<p>I find that all these &#8216;plugins&#8217; tend to slow WordPress down too much  at loading, so there is a good case for using this PHP alternative  rather than a plugin to hide Adsense from social traffic</p>
<ul>
<li><strong>Please notice</strong> that where the Google ad script is included in PHP you need to &#8216;Escape&#8217; all the double quotes &#8211; like this: script=&#8221;ad text&#8221; must be edited to read script=\&#8221;ad text\&#8221; and change any &#8216;slanted&#8217; quotes like ‘ and “ to vertical quotes like these <code>"'</code></li>
</ul>
<h2>Update on the Update</h2>
<p>This post is getting way too complicated.  I have been asked to  upgrade these codes to display an alternative ad to social traffic, so I  have made a new post over on my <a title="Hide Adsense" href="http://biznz.net/weblog/index.php/wordpress/hide-adsense-from-social-traffic/" target="_blank"><strong>Teaching Blog</strong></a></p>
<p>CONTINUED&#8230;&#8230;.</p>
<ul>
<li><strong>Why Hide your Ads?</strong><a href="http://biznz.org/wp-content/uploads/2008/10/surfer.jpg"><img class="alignright size-full wp-image-34" title="Hide Social Traffic" src="http://biznz.org/wp-content/uploads/2008/10/surfer.jpg" border="1" alt="Hide Social Traffic" width="203" height="270" align="right" /></a></li>
</ul>
<p><!--bloggingzoom--><br />
There is plenty of authority for hiding your ads from social traffic so you can <a title="Top Web Guru, Grizzly, says....." href="http://makemoneyforbeginners.blogspot.com/2008/04/how-to-increase-your-adsense-ctr.html">increase your a</a><a title="Top Web Guru, Grizzly, says....." href="http://makemoneyforbeginners.blogspot.com/2008/04/how-to-increase-your-adsense-ctr.html">ds</a><a title="Top Web Guru, Grizzly, says....." href="http://makemoneyforbeginners.blogspot.com/2008/04/how-to-increase-your-adsense-ctr.html">ense CTR</a> (from Grizzly&#8217;s Make Money Online Blog) and not have a lot of &#8220;views&#8221; that won&#8217;t ever get clicked. Here&#8217;s a direct quote from Vic Franqui; &#8220;One last thing &#8211; if you get a lot of <em><em>social</em> </em><em>media <em>traffic</em></em> don’t run <em>adsense</em>. Only use <em>adsense</em> if you draw targeted search engine <em>traffic&#8221;.</em></p>
<ul>
<li><strong>How It&#8217;s Done.</strong></li>
</ul>
<p>So now you can run Adsense even if you get masses of Social traffic &#8211; If you run a WordPress blog you can use the <a title="Who Sees Ads" href="http://wordpress.org/extend/plugins/ozh-who-sees-ads/" target="_blank">ozh who sees ads</a> plugin, but there is no easy plugin for Blogger or your normal website, so I have made up some JavaScript to use anywhere you want to show your ad to search traffic.</p>
<ul>
<li><strong>Wrap the ad in an &#8220;iframe&#8221;</strong></li>
</ul>
<p>Some ads like Amazon have the code already wrapped in an iframe, so all you need do is wrap this (green) Script,  around your ad code (red). The script detects if the referrer is Google, Yahoo, etc and displays the ad.<br />
<code><br />
<span style="color: #008000;">&lt;script type="text/javascript"&gt;<br />
&lt;!––<br />
var myArray = [];<br />
myArray[0]= '/search?';<br />
myArray[1]= '.yahoo.';<br />
myArray[2]= 'search.';<br />
myArray[3]= '/search/';<br />
myArray[4]= 'images.google.';<br />
for(var i=0;<br />
i&lt;5;<br />
i++) {<br />
if (document.referrer.indexOf(myArray[i]) &gt; -1)<br />
{<br />
//––&gt;<br />
document.write('</span><span style="color: #ff0000;">&lt;iframe src="http://rcm.amazon.com/e/cm?t=youraccount-20&amp;o=1&amp;p=26&amp;l=ur1&amp;category=computers_accesories&amp;banner=1SKRXV416ZYVKCEGXQR2&amp;f=ifr" width="468" height="60" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"&gt;&lt;/iframe&gt;</span><span style="color: #008000;">');<br />
}}<br />
&lt;/script&gt; </span></code></p>
<p><code><span style="color: #008000;"><span style="color: #000000;">Substitute <strong>your ad code</strong> for the code in red above. </span></span></code>This will work with any code that is completely wrapped in an iframe.</p>
<ul>
<li><strong>Display Google Adsense</strong></li>
</ul>
<p>This can be a problem because Blogger, for instance, will overide some scripts you include. The answer is to source the Adsense code from an outside file.  Pop your Adsense ad in a plain html file (<strong><span style="color: #ff0000;">adsense.htm</span></strong>); upload it to some place you can access; and call it as the source (<strong><span style="color: #ff0000;">src</span></strong>) of an iframe -<br />
<code><br />
<span style="color: #008000;">&lt;script type="text/javascript"&gt;<br />
&lt;!––<br />
var myArray = [];<br />
myArray[0]= '/search?';<br />
myArray[1]= '.yahoo.';<br />
myArray[2]= 'search.';<br />
myArray[3]= '/search/';<br />
myArray[4]= 'images.google.';<br />
for(var i=0;<br />
i&lt;5;<br />
i++) {<br />
if (document.referrer.indexOf(myArray[i]) &gt; -1)<br />
{<br />
//––&gt;<br />
document.write('</span><span style="color: #ff0000;">&lt;iframe scrolling="no" style="width:125px;height:125px;" frameborder="0" <strong>src="<span style="color: #800000;">http://YourSite.com/adsense.htm</span>" </strong>marginheight="0" marginwidth="0"&gt;&lt;/iframe&gt;</span><span style="color: #008000;">');<br />
}}<br />
&lt;/script&gt; </span></code><br />
<code><br />
Edit the above URL (dark red text) to point to where you uploaded your adsense.htm file, and adjust the width, height to match your Adsense ad</code></p>
<ul>
<li><strong>Just Copy and Paste</strong></li>
</ul>
<p>There you go &#8211; paste one of the above sets of script into your web page wherever you want the ad to appear. With Blogger, use an HTML/JavaScript Gadget, or else paste it directly into the HTML template in your header if you prefer.</p>
<ul>
<li><strong>Try it and See for Yourself&#8230;..</strong></li>
</ul>
<p>Click on <a title="Normal Link - No Search!" href="http://keywordcoherence.blogspot.com" target="_blank"><span>Site Synergy with Keyword Coherence</span></a><span class="url"><strong> </strong>for</span> my Key Word Coherence site and you will see no ads, but Google (or Yahoo) for keywordcoherence and click on the SERP link to that same site and you will see that a banner ad in the header from Amazon and a Google ad in the side bar have appeared, <span style="text-decoration: underline;">because the referrer was a search engine</span>.</p>
<ul>
<li><strong>Tips to the Wise&#8230;.</strong></li>
</ul>
<p>Be sure to edit the iframe dimensions to match your ad and check that your edit program paste function didn&#8217;t put left and right quotes into the script instead of plain quotes. Get that right and you will have learned <strong>how to hide Adsense from social traffic</strong>!</p>
]]></content:encoded>
			<wfw:commentRss>http://biznz.org/monetize-your-site/how-to-hide-adsense-from-social-traffic/feed/</wfw:commentRss>
		<slash:comments>192</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: biznz.org @ 2012-02-09 11:26:31 -->
