I always loved the clap button from Medium because it allows people how much you actually like a post. So I just implemented that functionality for my blog.
Attention!!
I’ve removed the code from AWS, so it is not working any more
If you are reading this, provably you are already seeing the clap button on the bottom left of the page. go ahead and try It! It is really addictive.
Why?
I enabled comments almost since the first day of the blog but I never got any comment. I know that there are some people reading my blog because Google analytics is telling me so and I’ve received some comments in LinkedIn. I think that the problem is that people must be logged in to actually write and that’s a huge effort.
I would like to have a more human-like metric of the impact from my post. Something that I cannot get from Google analytics. And It turns out that the clap button is just perfect for this purpose.
- It’s easy.
- It’s funny to click it.
- It’s anonymous.
I hope people read my posts and click the clap button proportionally to how much they like the post.
did you try the button yet?
How It works
The functionality of the button is really simple, when you hover it, you will see the total number of claps for the post that you are currently browsing. If you click It, the following sequence happens
- Confetti will fly out of the button.
- The total number of claps will be increased by 1.
- Your claps will increase by 1.
- I will be happier.
If you click fast enough, you can get up to 3 times more confetti than with a single click.
warning
All the claps submitted cannot be removed. Just like in real life.In case you are curious, the backend is using the following technologies.
- Go
- AWS Lambda
- AWS Dynamodb
- AWS HTTP API Gateway
If you want me to open source the code, just click the clap button. If we reach 1000 claps, I will do it.
I think 1000 claps is a reasonable number, If one person is really interested, he could reach 1000 alone. Clicking at a rate of 5 clicks/second it will take 3.3 minutes to reach 1000 claps.
Alternatives
First, I found that someone already did a clap button ready to plugin in your page. Applause also provides the backend and is totally open source. The problem is that I don’t like the approach of creating html from javascript and that’s exactly what the code is doing. Also, the clap button has some kind of limitation because It doesn’t allow you to click as many times as you like. In general, I was disappointed.
Then I found this Github gist with a clap button without a backend. I took that code and applied some modifications to CSS to style the button for my page and to Javascript to connect to my backend. You can see the result here!
Conclusion
Right now the backend is really simple, It just increments a value in Dynamodb and I don’t have any sense of how many different people actually clicked the button. Maybe I will work on that for the future.
did you know that you can also leave comments?