Thought I might share a neat Awstats hack of mine that I use to read my referer data better. This simple hack/addon is nothing more than a bit of regex. It takes your search traffic data and puts it into separate Yahoo, MSN, and Google tables. It also grabs your traffic from Digg.com and puts them into a nice table organized by referring page.
ScreenShot (Click To Enlarge)
Installation
All you got to do is append the code below into your sites’ conf file. Your conf file on a standard Cpanel setup is usually located in the /tmp/awstats/awstats.mydomain.conf folder below your root in the ftp. Place the code at the bottom, save, and reupload. Be sure to make a backup of your previous conf file even though this should be pretty foolproof.
If you got any requests for additions to this hack drop a comment and let me know.
thanks. another great post. ill try this later. bookmarked..
*sorry had to edit links out*
Another statement that mark the greatness of this blog!
Nice, a real code hack for awstats. I need to revisit what it can actually do and stop using the vanilla implementation.
The P90X fitness dvd set system includes several activities and exercises for the ones who want an attractive physique to enhance their personality.
Bonus For The People Who Read The Comments
Tracks referals from Google Images
Just add this below the others in the conf file.
Cool Eli. Thanks for that!
Cheers Eli, never paid enough attention to realise you could do this sort of thing with awstats!
This is brilliant.
You, sir, are both a scholar and a gentleman!
Does not work for me on a very busy site with about 2500 unique visitors per day. However works on a site with less traffic. Anyway - thanks for sharing.
Christoph
It doesn’t matter if you receive 100 people per day or 300 trillion people a day. This is still useful.
This line here
MaxNbOfExtra5=10
That line determines how many results to show.. (like this one is top 10)
This is top 5
MaxNbOfExtra5=5
Its not going to show you every single one that came thru..
I think your fulla shit cracker. Why don’t you enlighten us to all the ways you make all of this money online rather than slamming other folks?
Yeah, it’s just too easy to say things like “I made 56million bucks yesterday, and this site is full of shit.”
Who are u Cracker? Someone who doesn’t implement anything from here. You are wasting your time here, and time is money, so you are funny:)
It was a good tip Eli, Thanks.
I totally agree. I’m tired of reading about people who don’t actually want to work for anything anymore.
I deleted joe crackers comment. Incase you were curious he said the usual “This sucks you should spam myspace.” haha kind of like trying to sell cookies to the other girlscouts wouldn’t ya say? He also said he makes $xxx for his 100k visitors/day which means he’s officially got the lowest payouts and conversions in all of myspace spam history.
Getting boring so he’s banned from commenting.
sounds good
my AWSTATS conf file keeps reverting back to its original state a day after I add the code.
Anyone know why?
Are you on a cpanel setup?
Cpanel runs a cron that rebuilds all those config files daily.
Is there any way to turn this off (so we do not have to do the Chron job- as I can see that it may lose stats if done at the wrong time) or is there a way to find out when it does it, so we can time the chron job to place the code a minute after it updates?
Better still, what do we ask of the webhost? Are they able to do it their end? I have asked them before, but they cannot seem to work out how. I have 2 hosts, both with Cpanel, and one updates the conf file and the other does not.
The default awstats config file for cpanel is located at
/usr/local/cpanel/etc/awstats.conf
It would require root permissions to edit that file.
If your on shared hosting you’d have to manually upload your config file each time… Pain in butt…
Or make a cronjob that did it for you daily =)
Here’s the perl code for the cronjob. Don’t forget to put your perl headers at the top #!/usr/bin/perl or whatever.
$path_to_conf = '/home/mydomain/tmp/awstats/awstats.mydomain.conf';
$append_code = qq~
ExtraSectionName1=”Google Search Keywords/Phrases”
ExtraSectionCodeFilter1=”200 304″
ExtraSectionCondition1=”REFERER,^http:\/\/www\.google\.[^/]+\/search\?.*q=.*$”
ExtraSectionFirstColumnTitle1=”Search Phrases”
ExtraSectionFirstColumnValues1=”REFERER,[?&]q= *([^& ][^&]*[^& +])[ +]*(&.*)?$”
ExtraSectionFirstColumnFormat1=”%s”
ExtraSectionStatTypes1=PHBL
ExtraSectionAddSumRow1=1
MaxNbOfExtra1=10
MinHitExtra1=1
ExtraSectionName2=”Yahoo! Search Keywords/Phrases”
ExtraSectionCodeFilter2=”200 304″
ExtraSectionCondition2=”REFERER,^http:\/\/(\w*\.)*search\.yahoo\.[^/]+\/.*$”
ExtraSectionFirstColumnTitle2=”Search Phrases”
ExtraSectionFirstColumnValues2=”REFERER,[?&]p= *([^& ][^&]*[^& +])[ +]*(&.*)?$”
ExtraSectionFirstColumnFormat2=”%s”
ExtraSectionStatTypes2=PHBL
ExtraSectionAddSumRow2=1
MaxNbOfExtra2=10
MinHitExtra2=1
ExtraSectionName3=”Live Search - MSN Search Keywords/Phrases”
ExtraSectionCodeFilter3=”200 304″
ExtraSectionCondition3=”REFERER,^http:\/\/search\.(msn\.[^/]+|live\.com)\/.*$”
ExtraSectionFirstColumnTitle3=”Search Phrases”
ExtraSectionFirstColumnValues3=”REFERER,[?&]q= *([^& ][^&]*[^& +])[ +]*(&.*)?$”
ExtraSectionFirstColumnFormat3=”%s”
ExtraSectionStatTypes3=PHBL
ExtraSectionAddSumRow3=1
MaxNbOfExtra3=10
MinHitExtra3=1
ExtraSectionName4=”Digg.com Visitors”
ExtraSectionCodeFilter4=”200 304″
ExtraSectionCondition4=”REFERER,^http:\/\/(\w*\.)*digg\.[^/]+\/.*$”
ExtraSectionFirstColumnTitle4=”Digg Referers”
ExtraSectionFirstColumnValues4=”REFERER”
ExtraSectionFirstColumnFormat4=”%s”
ExtraSectionStatTypes4=PHBL
ExtraSectionAddSumRow4=1
MaxNbOfExtra4=10
MinHitExtra4=1
ExtraSectionName5=”Google Image Keyphrases”
ExtraSectionCodeFilter5=”200 304″
ExtraSectionCondition5=”REFERER,^http:\/\/images\.google\.”
ExtraSectionFirstColumnTitle5=”Keyphrases”
ExtraSectionFirstColumnValues5=”REFERER,^.*q\%3D(([^\%]|\%[^2]|\%2[^6])*)\%26.*$”
ExtraSectionFirstColumnFormat5=”%s”
ExtraSectionStatTypes5=PHL
ExtraSectionAddSumRow5=1
MaxNbOfExtra5=10
MinHitExtra5=1
~;
open(OUTF,”>>$path_to_conf”);
print OUTF “\n\n$append_code”;
close(OUTF);
Than just set it to update every night immediately after your awstats automatically updates(about 12:30am).
Eli, your on vacation.. Most people don’t troll around forums and lurk on blogs during vacation..
go camping, get drunk, goto the dairy queen and get a flameburger, or stop by here and pickup some money.
-rob
I heart Blue Hat SEO
My awstats hacking consists of simple wget referer spam:
http://www.google.com/search?hl=en&lr=&safe=off&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=Q0s&q=site%3Aedu+OR+site%3Agov+%22Links+from+an+external+page+%28other+web+sites+except+search+engines%29%22&btnG=Search
Holy shit!
nice comment!
Notice that the first result is a pr6
Hi Eli and GlobalwarmingAwareness..
I know you posted these comments about 6 months ago, but I’ve just found your blog and I am thoroughly enjoying it..
WRT to Awstats idea, what do you guys see as the best way to take advantage of this AWSTATS info you found in Google.
Initially I thought of using something like running a simple script that would call the root site with the HTTP_REFERER tag containing the site I want to promote, but is this the best way to tackle it..
Hopeing you can help
bruce
Awesome post. This will help a lot. I added your blog to my blogroll. This place is great.
Also there’s other packages that can be targeted, analog and webalizer come to mind. Bunch more here: http://en.wikipedia.org/wiki/Web_log_analysis_software#Popular_log_analyzers
You could also try stuffing the stats page with keywords through a google search referer. I’m not sure, but it may be possible to use keywords like keyword
Very useful hacks, thanks a lot, I already implemented them.
I was trying to modify the hacks to make it possible to track specific referrals but my hacking knowledge is rather limited, hence I didn’t succeed.
Is there a standard hack where one just can replace the url in order to track from which pages on a domain visitors are coming. That would absolutely great.
Hi Eli,
You forgot to say that you copied these great hacks from http://www.internetofficer.com/awstats/keywords-by-search-engine/
David
Actually, you forgot to give me credit
Your post date: Feb. 19th 2007
Mine: Jan. 19th 2007
:(
Credit where credit is due, would be I guess the Awstats documentation where most of this info is.
No worries though as long as the info gets out there and helps people, I’ll keep your link up anyway because you have a few useful comments in that post that I think everyone here should read. BTW my compliments on your blog I’ll add it to my reader and maybe add it to the blogroll here as well.
Nice Stuff!
Loads of different hacks and mods here to
sorry that didnt work here > http://computech-pcs.co.uk
cron jobs, php coding, mysql its all too much to take in!
AWstats is really useful though and i’m sure lots of people find this post useful too.
Interesting. So much hacking. It must be human nature to want to hack anything and everything
Cool. Great tip Eli
Error: The number of values found for extra section 5 has grown too large.
And I was only looking at a daily report! It would have been about 7000 uniques, 150,000 page views by this time of day. My awstats never had any trouble before the modification.
I was looking forward to this mod, it looked very promising.
Never used awstats, more of a Google Analytics guy.
There are some really great scripts out there (especially greasemonkey scripts) that put some extra data into your Analytics overviews.
I would certainly check them out.
-brad
Thanks for the script. It’s hard to sometimes organize all you traffic sources so you can see them all at once.
this is great! Thanks for that!
Didn’t know you could hack that as well.
Nice hack on Awstats.
Hey Eli,
I know this is a rather old post but I have just implemented your hacks and they work well.
For those who say the Extras exceed their lines in the log file, you should amend this line and increase the number:
ExtraTrackedRowsLimit=500
So count the lines in your access_log and increase the number with this.
I had two polite requests… I was wondering if you could possibly amend the regexp so that it rewrites the ampersand into & (my awstats are generated in xml and it will not parse anything if a & is found instead of &).
Also your Google images code works well but instead of spaces in the key phrases it displays + signs. Is there any way to modify it so it displays it with spaces like the other Extras?
Thanks alot and great blog, will keep on reading.
Sorry your comments seem to rewrite & amp; into a normal ampersand…
I don’t find aw stats so affecting
I´m using the AWSTast for years, but I never understand it to use it´s full potential… very good idea… thanks again
Simply a great piece of work.
Nice posting!
great article.
i learn many things from this article.
Thanks
Very useful hacks, thanks a lot, I already implemented them.
I was trying to modify the hacks to make it possible to track specific referrals but my hacking knowledge is rather limited, hence I didn’t succeed.
Any simple method?
Mind-blowing coding and post!
It is claimed that students return home from Callanetics classes and have energy to burn rather than the usual tiredness people suffer after high impact exercises.
Very useful hacks, thanks a lot, I already implemented them.
thanx for all
Very intereating article. Thanks because it is the useful knowledge.
very good about this topic
good job and nicee
good job Dude
you never cease to amaze me. thanks admin.
Very intereating article. Thanks because it is the useful knowledge.
very good about this topic. good job and nicee
Very useful hacks, thanks a lot, I already implemented the
These kids are still playing around with Awstats, nice!!
Hi,
I used the extra section trick you mention here and it’s working fine and well.
I do have a question though, I moved these days a site from one server to another and I would like to merge two awstats files so i can see all the stats on the new server.
I tried to do it manually (just for the total number of visitors) but it gets reset after running awstats again.
Do you have any advice? (I could wait for the end of the month and update the values then…)
When you
Very intereating article Thanks because it is the useful knowledge
Very useful hacks, thanks a lot, I already implemented them.
I was trying to modify the hacks to make it possible to track specific referrals but my hacking knowledge is rather limited, hence I didn’t succeed.
I’ve tried to use your code bur my ExtraSections in stats page still have empty set for search phrases.
I’ve tried a lot of different kind of codes for config files, but the section is still empty.
So what do I miss? maybe I have to modify something for the logs part or in the configuration file, have I?
You, sir, are both a scholar and a gentleman!
Hello i am so delighted I found your weblog, I truly found you by mistake, even though I was searching Yahoo for some thing else, Anyway I’m here now and would just like to say thanks for a tremendous weblog posting and a all round interesting blog (I also love the theme/design), I don’t have time to study it all at the moment but I have bookmarked it and also added your RSS feeds, so when I’ve time I is going to be back to examine far more..
I was trying to modify the hacks to make it possible to track specific referrals but my hacking knowledge is rather limited, hence I didn’t succeed.
8You made some respectable factors there. I appeared on the web for the problem and found most individuals will associate with with your website.
33Thanks i like your blog very much , i come back most days to find new posts like this.
10
php coding, mysql its all too much to take in!
AWstats is really useful though and i’m sure lots of people find this post useful too.
Its Legen–wait for it— dary legendary xD
The advanced in the sense that they are new and progressive sometimes more difficult than basic or require special tools and expertise some of the tactics are no short term tactics, they’re probably strategies.Thanks for sharing informative post.
Regards.
The everyone of us occasionally experience what it is when you can not find the right way of solving the problem and how much time it takes.Thanks for sharing informative post.
Regards.
I do agree with all of the ideas you have presented in your post. They’re really convincing and will definitely work. Still, the posts are too short for newbies. Could you please extend them a bit from next time? Thanks for the post.
I do agree with all of the ideas you have presented in your post. They’re really convincing and will definitely work. Still, the posts are too short for newbies. Could you please extend them a bit from next time? Thanks for the post.
I’ve been meaning to start a video blog for some time now
Me too, Xd
keep it up
thanx
this is great! Thanks for that!
Yep it surely is awesome
So much hacking. It must be human nature to want to hack anything and everything
It surely is my friend xD
It’s amazing how much technology has changed in the few short years since you first posted this article. Thanks for taking the time to write this along with the other many blog posts you’ve provided over the years. Much appreciated.
I really enjoyed reading this post,big fan. Keep up the good work and please tell me when can you publish more articles or where can I read more on the subject? Thank you on behalf of the
lol nice website chat p7bk chat egypt good
okkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
is kamine ke ok ki toh
yesssssssssssssssssssssssssss
Great post, and it is something which i was not expecting at all.
hahahahahhahah ok ke tokyy…. mar dyy sali koo…
and yeah good post
:(
dil to kr raha hy k kisi ko ja k ail lagaown #96
Why don’t you enlighten us to all the ways you make all of this money online rather than slamming other folks?
Thanks for this article, very interesting.
These kids are still playing around with Awstats, nice!!
nice hack… playing with awstats is like playing with fire… so exciting
Lol.. greatest joke so far but you have a sense of humour!
WoOOW very nice
good nice post i like
Hydraulic lift Planetary Mixer The snorkels mixer mixing a variety of mixed liquid and solid dissolved, dispersed, homogeneous and efficient equipment. The main motor for variable speed motors, medium speed for stirring to dissolve, for high-speed Mixing Equipment homogeneous with.
and yeah good post
Thanks for teaching us on how to install this one. this would be a lot easier to everybody else. Good job on this.
Great job, excelent post. thanks for sharing this with us. Hugs.
I have released 2 new site and have not had any problems getting them indexed in Google
thanks for sharing this..i have been looking for awstats hacks
These kids are still playing around with Awstats, nice!!
nice hack… playing with awstats is like playing with fire… so exciting
Cool Eli. Thanks for that!
Is still working ?
thanks man
it’s very good article
your Awstats hacks are more than neat.,they rock!
Thanks for sharing this informations!
use, and have some more good features. Try to learn all new version to be smart developer.
I’m big fan of wordpress MU
Miami SEO It also grabs your traffic from Digg and puts them into a nice table organized by referring page.
Thanks for taking this opportunity to discuss this topic and your information is very important for us.
search error in the bottom of the page instead, I think it is deeper.