Description
The WordPress Referrers plugin is a fully automated, self running referral tracking script.
You set it up once and just let it run, the list is automatically cut after x days, you can block any domains from being included, includes spam protection and other features.
Features:
- Automated and self running
- URLs are kept for x days
- List is constantly updated
- Show x referrers on any of your pages
- View all referrers option
- Block urls from the list
- Show the referrers x per row
- Change an outgoing URL to a special URL (such as a top list referral id)
- Pick titles for your referrers instead of using the domain name
- Tracks hits in and hits out
Demo & Download
This plugin is active on SeanBluestone.com (simply look at the bottom of the sidebar on the right hand side).
The plugin is available for download at WordPress from this page.
Installation
1. Extract & upload the topref folder to your ‘/wp-content/plugins/’ directory.
2. Activate the plugin via the Plugins menu in WordPress.
3. Navigate to Design -> Theme Editor -> Sidebar.php (or whichever page you like) and insert this code wherever you want your top referrers displayed:
4. Click Update to save your Sidebar.
Thats it! Your referrers should show up wherever you pasted the code. The sidebar is the best place because it’s on every page. However, if you wish to log referrals on every page but only display them on one specific page then put <?php topref_log_refs(); ?> in your Sidebar.php and <?php topref_display_refs(); ?> on your chosen page. <?php topref_log_refs(); ?> must be included on every page you want to collect referrals on.
By default the WordPress Referrers plugin displays the top X referring sites. You can display the last X referrals instead by calling like this: <?php topref_display_refs(‘Last’); ?>.
You can discuss this article and see what others are saying about it in the WordPress Discussion Forum
Did you find this article useful? Why not buy Sean a coffee?

44 comments ↓
Hi, thanks for this plugin, got a problem, can’t replace link names and block urls
Can you call both latest and last by including both versions of the PHP in the side bar?
Update: Tried it, didn’t work.
Suggestion: Can you make this into wordpress widget instead of putting in our templates
Hi Sean,
when I try to save options page, I got thr following error. On wordpress.org you write, it is compatible up to 2.3. Is that true? I use 2.6.3
Fatal error: [] operator not supported for strings in /is/htdocs/wp-admin/options.php on line 23
Best wishes
Daniel
on my sidebar I got the following error:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /is/htdocs/…/wp-content/plugins/wordpress-top-referrers/topref.php on line 236
Just to let you all know that version 1.1 is now available and takes care of a few problems:
- Widget added with customizing options.
- The Block URLs field now has its own form and deletes all referals from each site when updated.
- Issue with Replace Link Names fixed.
- topref_display_refs() can now be called multiple times from one page.
If any of you are still having issues after this update, please let me know and I’ll try and help.
Cheers!
Using Version 1.1. When trying to look at Top 25 or 50 referrers I got following error:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/===/domains/===/aarne/wp-content/plugins/wordpress-top-referrers/topref.php on line 108
Hi Sean,
issue 16 was my fault. It works fine now as you can see.
In 1.2 I still can’t change options using your options page. Same error as in issue 15. If I use wp-admin/options.php it works fine.
The more I can’t get your reports. The error is:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /is/htdocs/…/wp-content/plugins/wordpress-top-referrers/topref.php on line 108
Display URL Real URL In Out Time
Other reports have problems in other lines, for example 119.
Best wishes
xd
Aarne and xdaniel, thanks for the reports. I think both of your problems are because the plugin hasn’t upgraded properly. To do this simply deactivate then activate the plugin.
If you still have problems after this let me know.
hi Sean, you’re right, thanks. Reports are ok now, but the options page does still not work on my machine (15).
Deactivating and activating again solved the problem. Thank you!
Great plugin, but he doesn´t work with wp-cache activate. There is any way to do work both together?
Thanks.
wow, thanks… I search it!
Hi,
I have just installed and activated your plugin. No errors at all but for some reason it’s not collecting any data. I have inserted the “topref_log_refs()” in the footer.php template (below wp_footer) and confirmed that it is executing on all pages.
I see a comment above about incompatibility with caching. I run the Super Cache Plugin. Could this be the cause?
R
My Track For X Days is 7 but dont change this hits in of the links.
My “Minimum Hits” setting is stuck on 2. I have been unable to change it to 3. Why?
Hi,
I have top referrers installed. It seems to work okay, however it doesn’t seem to correctly track many referrers I have. I can see many sites sending me traffic via Google Analtyics, but they are not showing in the Top referrers plugin (and they are in my TOP 20 referrers in Google Analytics)
Any ideas?
Thanks
I realised it is not tracking all my traffic because my mian page is outside of wordpress, and is a level above my blog install.
Can I put outside of my wordpress install? Would that still track traffic properly?
Thanks
Hi Sean, great plugin.
Little quistion, dos this plugin also count the out gonig links in the loop/post of wordpress
Thanx,
So why is my Minimum Hits setting stuck on 2?
(See #32 above.)
Are there any plans to update this for wordpress 2.7?
Tested it and had a few bugs and also errors. The options page didn’t update, there were some mysql errors when trying to view top 25 and last 50, and also I don’t think hits were been logged correctly (checked with GA)
Thanks
Thank you my friend.
Very nice plugin, I just added it to my sites!
I just downloaded and installed it on my site. For some reason, I cannot get it to keep my info in “Replace Link Names.” I input info, click Save, and they go away.
hi, you plugin is just what I was lookin for. Only one question when the referrer url is like site.com/index.php?page=50 why when i clic on the referrer link it takes me to site.com not the exact page.
what do i need to change??.. thanks
thanks…i wanna say
GOOD JOB!!!
is there a posibility to make a reset option so i can start over once a month or so…
Also i still cant change the options in wordpress… like te Minimum Hits… puts the default back…
Excellent script but for one thing, I can’t change any of the options. When I click save they all return to the default.
But I can update the block list.
If we can figure out how to fix this it will be well worth a cup of coffee
Trackbacks
Leave a Comment