How? Prevent Adsense block showing if forum == x

Discussions about the Google AdSense System, Use, Integration, experiences ...

Moderator: Moderators


How? Prevent Adsense block showing if forum == x

Postby acapellas4u » Mon Aug 28, 2006 7:07 am

Hey all + dcz, been a while.

I've been extremely busy since my last post moving over the forum to a brand new server. I've also been busy beavering away trying to tweak the hell out of adsense and in general redesigning the overall_header.tpl and other .tpl's

anyways.... :)

I'm not clever enough to work this one out but I have certain forum sections that recieve a lot of 1 posts (new member intro posts) I'm not interested at all in showing my adsense block there neither are members interested in clicking from there either.

Is there a nice str8 forward way to put a clause into my adsense script within my .tpl files to say if the forum section's this then don't show it.. to extend this a little, it would be great to be able to have the option to add a list of forum sections as I'm sure there'll be another forum section that I'll want to NOT have Adsense show and also, it'll make any code suggestions here better first time.

Thanks for your help...

oh and btw, when do I have to come back and re-report my stats?? looking forward to that..
acapellas4u
PR0
PR0
 
Posts: 73
Joined: Tue Aug 08, 2006 3:33 pm

Advertisement

Postby dcz » Mon Aug 28, 2006 10:42 am

hello ;)

So first I just find out your robots.txt, and you really need to update it to what's advised in the mod rewrite release thread you're using.

As you can see, Google started to crawl your new URLs, but is spidering posts URLs as well, and you should avoid this.

For the AdSense filter, it's very easy to do so, but you'd need to be able to run php in templates if you want to do ti from there. Other wise you can as well parse the AdSense code using the phpBB template system and do the php work in the php file.

A simple way to activate php in templates and to make your web site faster by the same time is to use the XS mod.
It's very easy to install.

Then, you'll be able to use thing like this in your templates :

Code: Select all
<?php
$disallowed = array ( 3, 6, 24); // all disallowed forum ids
if (!in_array($_GET['f'], $disallowed) {
echo "your AdSense code";
} ?>


The principle is very simple and could of course be developed a bit more.

I think I'll just open up the AdSense forum now. We'll soon talk a lot more about AdSense there ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Postby acapellas4u » Mon Aug 28, 2006 11:15 am

I'm glad I posted here today then dcz!

so how does this robots.txt look now

acapellas4u wrote:User-agent: *
Disallow: /cgi-bin/
Disallow: /forum/
Disallow: /_forum/
Disallow: viewtopic.php
Disallow: viewforum.php
Disallow: index.php?
Disallow: posting.php
Disallow: groupcp.php
Disallow: search.php
Disallow: login.php
Disallow: post
Disallow: member
Disallow: profile.php
Disallow: memberlist.php
Disallow: faq.php

User-agent: ia_archiver
Disallow: /


Once you've given me the nod I will update and overwrite the existing robots.txt.

Thanks also for your quick turnaround re: adsense code consolidation.. I do have the extremes styles mod installed so yeah I can add php directly in via the .tpl files.

I guess I could add the <--Begin user logged in--> type switched aswell if I wanted to control wether or not the ads were shown to guests or not couldnt I?
acapellas4u
PR0
PR0
 
Posts: 73
Joined: Tue Aug 08, 2006 3:33 pm

Postby dcz » Mon Aug 28, 2006 1:22 pm

I usually prefer to add a "/" at the beginning of every line, but besides, it's the one you should use.

The phpBB <--Begin user logged in--> template switch can be used to limit adds according to the online status as per any other part of the template.

The <--Begin user logged out--> one can be useful too if you want to only show things to guest.

Have you checked this thread, some good links and mod for AdSense and phpBB ;)

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Postby acapellas4u » Mon Aug 28, 2006 5:07 pm

Oh great m8 - just what I was hoping for... as in a reply by the time I got back from a lovely bank holiday walk in the countryside.

So JUST to confirm, here's the newly edited robots.txt

acapellas4u's robots.txt wrote:User-agent: *
Disallow: /cgi-bin/
Disallow: /forum/
Disallow: /_forum/
Disallow: /viewtopic.php
Disallow: /viewforum.php
Disallow: /index.php
Disallow: /posting.php
Disallow: /groupcp.php
Disallow: /search.php
Disallow: /login.php
Disallow: /post.php
Disallow: /member.php
Disallow: /profile.php
Disallow: /memberlist.php
Disallow: /faq.php

User-agent: ia_archiver
Disallow: /


How's that :) ?
acapellas4u
PR0
PR0
 
Posts: 73
Joined: Tue Aug 08, 2006 3:33 pm

Postby dcz » Mon Aug 28, 2006 5:09 pm

Perfect ;)
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Postby acapellas4u » Mon Aug 28, 2006 5:15 pm

dcz wrote:Perfect ;)


Wicked - it's now in place.

Thanks for your headsup on this one dcz owe you one... (another one) ;)

And yeah, I didn't ocmment on the other points you raised but a) I'm aware of the login & logout elements and b) I've already contributed to that post you mentioned. I've actually spent loads of time (too much in fact) investigating and trying to tweak the sheeshkebab outta Adsense so that I've got it working to it's full potential for the forum AND for me :)

Two mjor changes I've looked at recently.. the 4 image rotating enhancement which has made a marked improvement in PageCTR - not loads but it's about 0.25 - 0.50%.. it's early days yet as I'm still experimenting...

secondly - i've just found the whole 'Adsense CHANNELS' area.. from an Adsenser's POV, this is a fantastic way to monitor the click thru and all withing Google's TOS.
acapellas4u
PR0
PR0
 
Posts: 73
Joined: Tue Aug 08, 2006 3:33 pm

Postby dcz » Mon Aug 28, 2006 7:12 pm

Definitely opened the AdSense Forum and moved this post into ;)

Yes I like this new feature too.

They really work on new services and tools all the time and this really is a good thing for us.


Then don't forget to keep the "about" big enough while commenting PageCTR, as it's against their TOS to tell your stats to others.
And nobody wants to be blacklisted from the Google AdSense system ;) I am pretty sure they survey for this.

And yes, the Channel settings can be very handy to track results within a web site or among several.

Have you tried Google Analytics so far ?

Interesting results, every body running AdSense should use it IMHO.
You got everything you need to track everything very precisely.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19930
Joined: Fri Apr 28, 2006 9:03 pm

Postby acapellas4u » Mon Aug 28, 2006 10:29 pm

dcz wrote:
Have you tried Google Analytics so far ?

Interesting results, every body running AdSense should use it IMHO.
You got everything you need to track everything very precisely.

++


Yeah I have an account for the Google Analytics.. and tbh dcz I haven't logged into the account since creating it some time ago - so hopefully there's a gr8 bunch of data stacked up.. and it would be interesting to hear how you use the Analytics along with your Adsense account to perhaps further tweak your site.. :)

acapella
acapellas4u
PR0
PR0
 
Posts: 73
Joined: Tue Aug 08, 2006 3:33 pm

Postby 993ti » Mon Aug 28, 2006 11:34 pm

I look at with what keywords the sites are found and try to optimize for those keywords.
Haven't been busy with the other features though (i know i should).
993ti
 
Posts: 16
Joined: Sat Aug 26, 2006 6:25 pm

Postby dcz » Tue Aug 29, 2006 1:20 pm

hehe,

Just opened the Google Services Forum ;)

I am using Google analytics too, and I am quite impressed with the precision of datas. The only concern about this is Google is at the same time the one to check and to count AdSense click and views.

I bet the result will match. But I don't think Google would cheat on such matters. It's rather a theoretical problem here, the Google analytics results are not independent and you don't have the hand on all the filters (bot filtering for example, Google analytics does not count any bots visits while even Urchin previously was, a good thing for sure, but who and what is a bot exactly ?).

I personally trust this service as accurate, but I never forget Apache logs are our only truth in such matters.

By the way, I found Google very open minded to give webmasters a chance to see how far they must go for themselves while doing stats, because I don't see any reason why they'd not perform the same exact stats just from the AdSense script.

One could acknowledge that using Google analytics or Google AdSense is as well providing useful info's to Google while they always need to analyse how the web is used to improve their search and AdSense algorithms.

Not bad at all, actually I think everyone using AdSense should as well use Google analytics, since these stats are already most likely to have been logged by Google.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 19930
Joined: Fri Apr 28, 2006 9:03 pm


Return to Google AdSense

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 1 guest


 
cron