I have a forum which displays AdSense ads to non-registered users but not to registered users.
In my html pages I inserted a conditional statement at the top of my AdSense publisher code like this:
<script type=”text/javascript”><!–
if (asppg_showGoogleAds){
google_ad_client = “pub-xxxxxxxxxxxxxxxx”;
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = “728x90_as”;
google_ad_type = “text”;
google_ad_channel =””;
google_color_border = “80FFFF”;
google_color_bg = “80FFFF”;
google_color_link = “0080C0”;
google_color_text = “000000”;
google_color_url = “000000”;
}
//–></script>
<script type=”text/javascript” src=”
</script>
This has worked fine for a long time but I have now been told by Google that it is against their Terms and Conditions to modify the publisher code in this way.
I am sorry to say that because of my ignorance of javascript I have no idea how I might move the conditional statement outside the publisher code and still have it work as intended.
Any help much appreciated.