WordPress Top Referrers

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 ↓

#2 gusmanidas on 10.24.08 at 3:56 pm

Hi, thanks for this plugin, got a problem, can’t replace link names and block urls

#4 Alan Kellogg on 10.24.08 at 5:05 pm

Can you call both latest and last by including both versions of the PHP in the side bar?

#5 Alan Kellogg on 10.24.08 at 5:10 pm

Update: Tried it, didn’t work.

#9 Anon on 10.25.08 at 12:54 am

Suggestion: Can you make this into wordpress widget instead of putting in our templates

#15 xdaniel on 10.26.08 at 7:24 pm

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

#16 xdaniel on 10.26.08 at 7:42 pm

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

#17 Sean on 10.29.08 at 4:04 pm

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!

#18 Aarne on 10.30.08 at 9:15 am

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

#19 xdaniel on 10.30.08 at 9:50 am

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

#20 Sean on 10.30.08 at 3:55 pm

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.

#21 xdaniel on 10.30.08 at 5:04 pm

hi Sean, you’re right, thanks. Reports are ok now, but the options page does still not work on my machine (15).

#22 Aarne on 10.30.08 at 8:30 pm

Deactivating and activating again solved the problem. Thank you!

#27 juan on 11.14.08 at 1:43 am

Great plugin, but he doesn´t work with wp-cache activate. There is any way to do work both together?
Thanks.

#28 k800 on 11.15.08 at 4:25 pm

wow, thanks… I search it!

#29 Robert@PNG on 11.18.08 at 11:51 am

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

#31 Xis on 12.11.08 at 7:57 pm

My Track For X Days is 7 but dont change this hits in of the links.

#32 Mark Roth on 12.20.08 at 4:41 pm

My “Minimum Hits” setting is stuck on 2. I have been unable to change it to 3. Why?

#33 Jay on 01.05.09 at 7:28 am

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

#34 Jay on 01.06.09 at 5:28 am

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

#35 Frank on 01.10.09 at 11:34 am

Hi Sean, great plugin.
Little quistion, dos this plugin also count the out gonig links in the loop/post of wordpress

Thanx,

#36 Mark Roth on 01.13.09 at 4:53 pm

So why is my Minimum Hits setting stuck on 2?

(See #32 above.)

#37 Goodings Web on 01.17.09 at 9:51 am

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

#38 Yasam Kadin - Islami bilgiler, Yemek Tarifleri , Güncel Haberler , Rüya Tabirleri, Teknoloji Haberleri on 01.25.09 at 12:35 pm

Thank you my friend.

#39 Hikari on 02.03.09 at 3:43 pm

Very nice plugin, I just added it to my sites!

#40 Tony Law on 02.12.09 at 9:52 pm

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.

#41 fher98 on 02.25.09 at 6:12 am

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

#42 esanstudio.net on 06.11.09 at 7:37 pm

thanks…i wanna say

GOOD JOB!!!

#43 Marco on 09.28.09 at 11:49 am

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…

#44 seymour on 11.12.09 at 2:59 am

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

  1. Weblog Tools Collection: WordPress Plugin Releases for 10/24 | Aslifmbiz Blog
  2. Weblog Tools Collection: WordPress Plugin Releases for 10/24 | KaosKoxp Oyun Portali
  3. WordPress Plugin Releases for 10/24 | bloground.ro - Blogging resources, WordPress themes and plugins for your development
  4. WordPress Plugin Releases for 10/24 | Wordpress Blog NL
  5. Weblog Tools Collection: WordPress Plugin Releases for 10/24 | PR & Tech
  6. WordPress Plugin Releases for 10/24 | BlogBroker24-7
  7. WordPress Top Referrers
  8. WordPress Plugin ออกใหม่ 24 ตุลาคม 2551
  9. Naghies » Blog Archive » افزونه های تازه
  10. سیاره وردپرس فارسی » افزونه های تازه
  11. WordPress Plugin Releases for 10/24 · Softonix.com
  12. WordPress Plugin Releases for 10/24 | Free Blogs
  13. Weblog Tools Collection: WordPress Plugin Releases for 10/24 | Aslifm Blogu
  14. 9 New & Popular Wordpress Plugins In October 2008 | Rob Malon [dot] Com
  15. » WordPress Referrers - WordPress Plugins Catalog

Leave a Comment