August 21st, 2007

Comment Referrers 0.1

WordPress, by Donncha.

comment-referrers.png

Here’s a small plugin that does a small but useful task. It reports where the people who comment on your blog come from. It then adds a line to the end of your comment notification or moderation emails with that information.

Download: comment-referrers.txt

Install by renaming the file to .php and placing in your plugins folder and activating it on your WordPress plugins page.


Update! Here’s the plugin page for this plugin.

You might also like

If you like this post then please subscribe to my full RSS feed. You can also click here to subscribe by email. There are also my fabulous photos and funny videos to explore too!

Back Top

Responses to “Comment Referrers 0.1”

  1. Small plugin but great idea. I like it and found very useful.

  2. cool stuff. does wordpress understand the referrer already, or does this require a specific stats package?

  3. Adam – the plugin uses a small bit of Javascript to get the referrer and adds it to the comment form. Nothing else needed!

  4. Just tested it with wpmu and I didn’t notice any bugs. Nice work!

    Thanks,
    Andrew

  5. Excellent. Maybe I can use it to see where the spam is coming from…

  6. Nice plugin

    Chess Teacher at August 21, 2007 6:03 pm
  7. Nice Idea & plugin.. I just activated it.. ! Really useful !

  8. That’s a really good idea. It would be easy to add other information about the user too, wouldn’t it? such as browser string, country, etc?

  9. Ike – unfortunately the spammers either don’t have a referrer or pass on the string escape(ref).

  10. Nat – sure would, just add the appropriate browser variable to the Javascript and PHP parts!

  11. If we had a commentmeta table, we could store this information with the comment.

  12. Nice Donncha, thanks!

  13. Shame it doesn’t help much with bot Spammers, but it’s always nice to know where your active users are coming from. I’d love to see something like this on Postnuke…

  14. Thanks for the recommendation :) Am going to try it now as it’s always good to find out a bit more about sites that link back!

  15. Dude put it on the plugin directory!

  16. Great Plugin. Thanks for a simple install plugin that is useful.
    Any added user referrer features are a great addon. It’s not only fun to see where your visitors, commenters, etc, are coming from but helpful in terms of content, language and safety.

    Feral Pundit at August 22, 2007 6:20 am
  17. Great idea! Have just installed and will enjoying testing/using this new plugin.

  18. This could be interesting, it would be great it you kept the first referring sites details too. i.e. you could check the google string the used when they arrived and see what ones get you more comments.

  19. I have installed this plugin on my blog as instructed but am not seeing referrers in comment notifications. Am I missing something?

    - Dave

  20. Dave – make sure there’s a referrer to report. Click on a post from your homepage and enter a comment. If you have WP-Cache installed you should clear the cache too.

  21. OK. I got it now. Thanks.

  22. This is a great idea. I can see it working in two ways:

    1. When you receive a lot of negative feedback on a blog post, it can help you identify if these are regular readers or if they are new readers coming from another source, possibly where they’ve been told to leave nasty comments. If it’s the latter, you can choose to ban them until their hostility settles down (with the wp-ban plugin).

    2. When you receive a lot of positive/ feedback on a post, you can thank whoever sent the readers by sending the referrer an email or giving them a link.

    Elaine Vigneault at August 24, 2007 6:46 pm
  23. I’ve had great luck with spam karma 2.

  24. Just wanted to say that the plugin is working a treat for me – nice work :)

    I don’t get many commenters on my blog, but it’s definately nice to get an idea where people came from.

  25. This plugin is a miracle worker!

    Thank you!

    It tells me where people found my articles when they leave a comment. Very very useful!

    WordPress webmaster – get this plugin! You need it! :-D

  26. Great little plugin, i’ve just been trying it out on one of my newish blogs which is getting spammed to death! One step closer to a spam free world is definately a good thing!

    Mike - Freelance Web Designer at December 11, 2007 8:42 am
  27. Not really sure why you would need this, but I guess if you really want to know where your comments are coming from then this could be useful.

    I think if you wanted to take this to the next level you would store the results in a table then graph the results using jpgraph or something similar.

    SEO Monitoring at January 26, 2008 4:56 am
  28. I noticed in the small image screenshot you have, aside from Approve it and Delete it, you have spam it. I do not have that in my emails. I only have Approve and Delete. Does your plugin also activate the Spam it? Or is this another plugin that I don’t have right now.

    seocontest2008 at February 10, 2008 9:23 am
  29. I really like this plugin. I think it’s good to find out these things.

  30. Great idea, a referrer plugin :) That’s why I love wordpress, when you get the community involved with open source, everyone benefits. Thanks!

    Facebook Addict at February 19, 2008 12:34 am
  31. Does it really bug you that much? I just use Spam Karma for WP and I rarely have to delete anything.

  32. Excellent. Maybe I can use it to see where the spam is coming from…

  33. >>seocontest2008
    You need to activate your Akismet plugin – as provided automatically with Wordpress :)
    You’ll need to grab an API code, or whatever its labelled from wordpress.com I think.

  34. Great plugin, installed it on my blog.
    Since it’s not that much of a code, I think it would be a good idea to have it incorporated into WordPress code itself.

    Vlad - Small Business and Web Design at February 28, 2008 4:37 pm
  35. What I’m wondering is,if the person is actually contributing to the conversation with a legit comment,why would you object to them trying to get some traffic and rank on their site? I could understand if it was something generic like “Nice Blog,great post.” But it seems that the person actually had read the post and actually commented appropriately.

    Am I missing something?

  36. Scott – not when the person intentionally goes looking for blogs to comment on. It’s even more evil and sneaky than “ordinary” spam because it’s harder to spot.

  37. Excellent, thanks a lot for the plugin.

    Warhammer Online at March 2, 2008 10:44 pm
  38. This sure comes in really handy. I wouldn’t mind getting a lot of comments. The plugin will let me know who’s who and where they are.

  39. I have tested too and in my opinion is free of bugs. Nice work guys.

  40. Spam karma 2 tends to block almost everything, even legit comments.

  41. >>Rob – have you reported your problems to the author(s?) of Bad Karma? I’ve not had any friends report problems with posting comments in the past. I’m sure if the problem could be found, that the people responsible for the plugin would want to improve it…

  42. What shows up if the visitor comes from a bookmark, like I did?

    Jack

    Baby Clothes from Jack and Abby at July 10, 2008 9:06 am
  43. Jack – you’ll just have to install it, but I doubt you will because I think you’re a spammer :)

  44. Thanks a lot! This is just what I need! ;)

  45. I notice that referrers aren’t always included – would this only happen if they access the post directly, from a bookmark, or are there other situations I should consider?
    I meant to ask, is the plugin not supposed to link to its page over at the official WP repository?
    Also, in case you’ve not seen it, there is a support query over at http://wordpress.org/support/topic/160621

    Chris Merriman at October 29, 2008 10:29 pm
  46. Chris – referrers aren’t shown when there isn’t one. Lately I’ve noticed an increase in spam comments with a referrer and noticed a pattern in my logs from the IPs of those commenters.
    The spammers have a new tool, it’s probably desktop based and probably launches a browser with the post in question. Those comments don’t have referrers.

    I didn’t have a specific page ready for the plugin when I created it, so I do need to point it at the right one now. Doesn’t have to be the wporg plugin page though. Thanks for noticing!

  47. i dont think this is going to stop spammers. We have to find a more reliable solution.

    • HAHAHA, oh yes it will. You came from a Google search for “spam karma 2″ “Name” “Email” “Leave a Reply” so I removed your email address (so you can’t leave further comments without moderation) and your url too. Bye bye spammer!

  48. I don’t really understand much about this stuff but here goes. Thanks Donncha.

  1. WordPress Plugin: Comment Referrers 0.1 » Brown Thoughts (,August 21, 2007)

    [...] check your stats package, you’re in luck. Donncha over at Holy Shmoly! has just released the Comment Referrers plugin. This little beauty adds a line at the end of your comment notification email with that specific [...]

  2. WordPress Plugin: Comment Referrers | AVINASH 2.0 - Infotech, New Media, Blogging, WordPress & Design (,August 21, 2007)

    [...] Comment Referrers is a really nifty WordPress plugin developed by Donncha O Caoimh that does a small but useful task. It checks where the people who comment on your blog come from. It then adds a line to the end of your comment notification or moderation emails with that information. [...]

  3. Odsyłacze przy komentarzach w WP | LukemBlog - Dziennik prawie osobisty (,August 21, 2007)

    [...] “innych wiadomości WordPress” znalazłem interesujący plugin – Comment Referrers. Do każdego e-maila informującego o nowym komentarzu dodaje on link do strony referującej. Jego [...]

  4. Comment Referrers 0.1 WordPress Plugin » D’ Technology Weblog: Technology News & Reviews (,August 22, 2007)

    [...] a small plugin by Donncha, that reports where the people who comment on your blog come from. It then adds a line to the [...]

  5. Wordpress Plugin: Comment Referrers (,August 22, 2007)

    [...] new Wordpress comments plugin developed by Donncha – small plugin with useful task.  This plugin checks and report where people leave comment on your [...]

  6. Comment Referrers Plugin (,August 22, 2007)

    [...] It is currently a beta release and the first version, but it’s supposed to be working already. If you are interested you can grab it [here]. [...]

  7. How to successfully spam blogs (and how to fight back) - Holy Shmoly! (,February 27, 2008)

    [...] my Comment Referrers plugin. That will add a line at the end of the moderation emails with the referrer of the visitor. [...]

  8. 3 полезных WordPress-плагина для борьбы со SMO-спамом » Свобода слова вебмастерского (,March 7, 2008)

    [...] Comment Referrers – делает очень простую, но весьма полезную вещь – в конце письма, уведомляющего о необходимости модерации комментария, добавляет поле Referrer, в котором показывается ссылка, откуда пришел посетитель, прежде чем оставил комментарий. Это информация может помочь в принятии решения относительно того, SMO-спам это или нет. [...]

  9. 3 WordPress plugins useful to combat spam-SMO » Web-master's Freedom of Speech (,March 22, 2008)

    [...] Comment Referrers – makes a very simple but very useful thing – at the end of the letter notifying you of the need for moderation commentary adds Referrer field, which is showing a link from where a visitor came before left a comment. This information can assist in making decisions on whether SMO-spam or not. [...]

  10. 3 полезных Wordpress-плагина при борьбе со спамом || Alternative Internet Project (,July 18, 2008)

    [...] Comment Referrers – плагин, который добавляет новую строку “Referrer”, [...]

Leave a Reply

Back Top


Holy Shmoly! is Digg proof thanks to caching by WP Super Cache