Issue:
Recently on CollegeTips.com we noticed we were visiting the site a lot and inflating the number of visits/views for pages of the website. This is a problem when we make our revenue off of those ads and the SBIM team lowers the CTR’s (Click Through Rates) of the ads, leading to less revenue.
Solution:
In order to get around this we implemented some very basic PHP logic to determine when to display the Google Adsense ad. Because PHP is a server side language this logic is performed before the HTML is sent to the users browser. This allows us to still adhere to Google’s Adsense policies.
Basically, if the visitor IP is a specific IP address, then do NOT display the ad, otherwise display the ad.
PHP Code (simple example):
<?php $visitorip=$_SERVER['REMOTE_ADDR'];
if($visitorip<>'66.10.XXX.XXX') : ?>
<div style="margin-bottom: 10px;"> <script type="text/javascript">
<!--
google_ad_client = "pub-XXXXXXXXXXXXXX";
/* 468x60, created 9/16/09 */
google_ad_slot = "1492822712";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
<?php endif; ?>
We also could use this if / then statement to include a specific file if the condition is met.
Next Steps:
Now we would want to add any IP’s of any internal stakeholder (basically anyone who touches the website and works with/for SBIM). This would include our bloggers, partners, consultants, family, offices, etc.
Notes:
Please note the increase you may receive from this could be marginal at best. These statements are under the assumption your internal team visits your website frequently and views several pages of your website on a daily basis.
