Since I can finally use Firefox Referrals within Google Adsense, too, here’s a quick tip for those who put the ads on their sites, but forgot that not everyone needs Firefox (e.g. those who installed it already and are viewing your site with it :D).
If you run WordPress for example, you can quickly insert this PHP code to show the Firefox ad just to those using not Firefox:
<?php
if(strpos(@$_SERVER['HTTP_USER_AGENT'],'Firefox') === FALSE) {
?>
<script type="text/javascript"><!--
google_ad_client = "pub-4253783154304212";
google_ad_width = 120;
google_ad_height = 60;
google_ad_format = "120x60_as_rimg";
google_cpa_choice = "CAAQ2eOZzgEaCD4zuVkdzt_CKI-293M";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php
}
?>
If you want to show something else when the user is using Firefox (for example an AdSense banner):
<?php
if(strpos(@$_SERVER['HTTP_USER_AGENT'],'Firefox') === FALSE) {
?>
<script type="text/javascript"><!--
google_ad_client = "pub-4253783154304212";
google_ad_width = 120;
google_ad_height = 60;
google_ad_format = "120x60_as_rimg";
google_cpa_choice = "CAAQ2eOZzgEaCD4zuVkdzt_CKI-293M";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php
}
else {
?>
<script type="text/javascript"><!--
google_ad_client = "pub-4253783154304212";
google_ad_width = 234;
google_ad_height = 60;
google_ad_format = "234x60_as";
google_ad_type = "text";
google_ad_channel ="";
google_color_border = "F4F4F4";
google_color_bg = "FFFFFF";
google_color_link = "142A3B";
google_color_url = "142A3B";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php
}
?>
You can use the code above directly, or replace it with your own so you actually earn the money.
Pingback: The Future Of The Web()