Don’t bother Firefox users with AdSense Firefox Referrals | the j-blog




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-xxxxxxxxxxxxxx";

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):




more..
Latest
Previous
Next Post »