How to Add a Comment System to Website

By Xah Lee. Date:

I just installed Disqus last week. It's a JavaScript snippet. Place on your website, then people can leave comments. The comments are saved in their server. You pretty don't have to manage it. All you have to do is to place the JavaScript code on each page. Nice. (See: Disqus JavaScript Code)

A Little History on Website Comments and Technology

Comment started in late 1990s. By early 2000s, blog became popular, and comment follows. Many mainstream news websites such as CNN, Time mag, started to let users add comments in all their articles. Though, it is considered experimental. Some organization embraced it, some still take a watch and see stance. Some show comments on the same page, while others show comments in a separate page, still others, make a selected few comments on the article page.

By now, almost all websites have comments.

I never wanted comments. Because, when you look at the comments, some perhaps 95% of it is useless drivel, factually incorrect info, or uninformed opinion. However, from business point of view, it is good. It seems that people like it. People want to be able to input their opinions. For example, if you read a article and thought it's biased, you have a urge to call it out. Also, comments increase your site traffic significantly, perhaps 10 fold. Because, when people leave comment, others may not agree and left a reply. So, users came back to the site, sometimes to argue, sometimes to see what others say, or otherwise just to keep informed on any developments. When good comments hits the article, the article author may correct his article, or add input from useful comments, and that almost always happens when there are a lot comments.

But still, i didn't see much of the positive points. Mostly what i see is the 95% drivel. The content on my site is mostly academic articles and tutorials on math and programing. I kinda considered it more like writing a book. And it is a pure hobby, a love of sorts. And i am kinda haughty. My thoughts were, if i let reader comment, then wouldn't it rather distract my readers? Because, my site's pages with very informative article, expositions, essays, would be infested with a whole bunch of random, pot-shot, thoughts. I took the old fashioned approach. That when people want to comment, if they are serious, they could easily write a email to me, then if i find it interesting, i edit my article with credit to the person. However, this approach is inefficient. I realized that, there's lots emails i have to go thru, to reply to, with this one-to-one email exchanges. It easily takes a few hours a week, and often i just didn't have time. Also, 99% who otherwise would comment with valuable info will not bother with the trouble to actually fire up their email to write it. It needs to be spontaneous and painless.

History of Web Comment Technology

In the beginning, comment system is built into the website. To have comment, basically you write code in CGI, PHP, Perl, as part of your website system. Then in around ~2001, web content management system (CMS) became popular. So, instead of coding your own, you simply add a module. But around 2007, a even newer tech, the web 2.0, became popular. It's all JavaScript based. Instead of using a particular CMS and modules, there are a lot JavaScript “widget” based modules that you can just plug in into your website.

In early 2010, i started to monetize my website. And thought about adding comments. But the problem was that i haven't looked into how i can do that on the tech aspect. So, in the beginning i simply tried to manually mirror any new articles to Blogger, and put a link to the blogger version from my website. So that, those who want to comment can follow the link to Blogger and post there. But this is not a good solution, because it's a extra link, comments doesn't show in the same domain. This is not what people want. Alternative solution is to switch my entire site of 4k static html pages into PHP, or a CMS system such as WordPress. I've been wanting to look into WordPres but never got around to it. But then i discovered Disqus, and it works really well.

BUY ΣJS JavaScript in Depth