Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 New site almost finished couple google questions?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

JJenson
Advanced Member

USA
2121 Posts

Posted - 11 August 2009 :  01:20:41  Show Profile  Visit JJenson's Homepage  Reply with Quote
Hey I am just about to launch the redesign of my website. I wanted to get some feedback from everyone on how to really make google adsense work with the website?

Any kind of tips or anything would be greatly appreciate. I won't be posting a link as I don't want anyone to think I am advertising my site.

Thanks all for the suggestions.

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 11 August 2009 :  03:35:56  Show Profile  Reply with Quote
I run Google adsense on some of my sites, and have two Include files which I call to show the adverts:

google_ad.asp

This has the following code in it so that the Admin pages or pages of the forum I do not want the adverts shown on, do not get the Adverts shown:

<%
'## GOOGLE ADSENSE PAGE CHECKS AND JAVASCRIPT HERE
if not(Instr(Request.ServerVariables("Path_Info"), "active_users.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "active_u3.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_accounts_pending.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_accounts_pending_reminder.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_attach.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_config_activeusers.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_config_colors.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_config_email.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_config_features.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_config_system.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_config_members.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_config_ranks.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_config_datetime.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_config_sitestat.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_config_system.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_config_groupcats.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_count.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_downloads.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_emaillist.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_home.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_faq.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_forums.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_guestbook.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_inactive_massdelete.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_inactive_users.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_info.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_library.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_login.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_member_search.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_metatag.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_mod_dbsetup.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_mod_dbsetup2.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_moderators.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_pmmaint.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_points.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_policy.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_search_ip.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_searchlog.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_show_mem_password.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "admin_variable_info.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "classadmin.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "forum_stats.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "lib_delete.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "lib_upload.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "lib_upload_replace.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "members.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "member_stats.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "merge.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "myfiles.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "nladmin.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "pmadmin.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "pmadmin_delete.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "pmadmin_options.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "pmadmin_read.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "pmadmin_sent.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "pm_delete.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "pm_options.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "pm_view.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "pop_memberinfo.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "pop_profile.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "post.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "privateread.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "privatesend.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "privatesend_info.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "register.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "setup.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "subscription_list.asp") > 0) and _
	not(Instr(Request.ServerVariables("Path_Info"), "welcome.asp") > 0) then
   GoogleAdOK=TRUE
else
  GoogleAdOK=FALSE
end if 
if GoogleAdOK=TRUE then 
  %>
<!--#INCLUDE VIRTUAL="/forums/google_ok.asp" -->
  <%
else

response.write	" "
	
end if
%>


The file of google_ok.asp has the google adsense code in like so:

<center>
<script type="text/javascript"><!--
google_ad_client = "<Your Pub ID>";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_channel ="";
google_ad_type = "text_image";
google_color_border = "FB7905";
google_color_bg = "FFFFFF";
google_color_link = "020100";
google_color_url = "FB7905";
google_color_text = "020100";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br>
<!-- Search Google -->
<center>
<form method="get" action="http://www.google.com.au/custom" target="_blank">
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a target="_blank" href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></a>
<input type="text" name="q" size="31" maxlength="255" value="">
<input class="attachButton" type="submit" name="sa" value="Search">
<input type="hidden" name="client" value="<Your Pub ID>">
<input type="hidden" name="forid" value="1">
<input type="hidden" name="ie" value="ISO-8859-1">
<input type="hidden" name="oe" value="ISO-8859-1">
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;">
<input type="hidden" name="hl" value="en">
</td></tr></table>
</form>
</center>
<!-- Search Google -->
</center>

(Replace <Your Pub ID> with your Google Publisher code)

This works for me and gets a bit of money back from Google on some sites. The higher that you have the Google Adsense on the page, the better chance of the payment. Just my 2 cents worth.

Cheers,

David Greening
Go to Top of Page

JJenson
Advanced Member

USA
2121 Posts

Posted - 11 August 2009 :  11:11:01  Show Profile  Visit JJenson's Homepage  Reply with Quote
Great tip thanks David. That will defiantly be useful.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07