Announcing the Magic Pages Open House. Quarterly calls with our team!

Back to blog

Emoji reactions for your posts, without tracking

Let readers react to your posts with up to five emojis. One snippet in Ghost's code injection, no cookies, and free for anyone.

· 3 min read

A customer asked us for a like button under his posts. So we built Pagemoji: emoji reactions for any website, with no cookies and nothing that follows your readers around. It's free and open source.

You pick up to five emojis, and readers react with a click, without signing in. If you don't add it, nothing changes on your site.

Why we built our own

Ghost lets members like comments, and newsletter readers can click "More like this" at the bottom of an email. But there's no button on your website for the post itself.

The closest thing is the applause button. Murat Çorlu of Synaps Media runs a free server for it at applause.synaps.media, and if one clap button is what you want, it's a good choice.

But our customer asked for a like, and we wondered why it should stop at one button. A post can earn a ❤️, a 💡 for "I learned something", or a 😂 for well...a really, really funny post, right? We looked for something flexible that does exactly that and works on any site, and didn't find it. There are WordPress plugins, and comment systems that come with reactions. But there's nothing that just does reactions.

Setting it up

The generator at magicpages.co/pagemoji writes the code for you. Pick your emojis, a style and, if you like, a line of text such as "What did you think?". The preview shows the result as you go.

Then copy the code into Ghost Admin under Settings → Code injection → Site footer. The reactions appear at the end of every post, whatever theme you use. Ghost marks each page that is a post, and Pagemoji only adds the buttons there, so your home page, tag pages and static pages stay as they are.

If you edit your theme, the generator also has a version for post.hbs. That one counts reactions by post ID, so they survive when you change a post's URL.

What it keeps about your readers

Nothing is saved in your readers' browsers. There are no cookies involved in the way Pagemoji works.

The buttons and the counts come from our server at pagemoji.magicpages.co. A click sends three things: the address of the post, the emoji, and whether it was added or taken back. The server keeps one number per post and emoji, and that's the whole database.

It does have to stop one person from clicking the same emoji 500 times. So it turns each reader's IP address into a scrambled code, using a random key, and remembers that code for a while. The key is replaced every hour, and everything recorded with it is deleted. IP addresses are never stored, and our web server keeps no access logs for Pagemoji.

The script is under 4 KB when compressed. It takes its colours from your theme's text, so it fits light and dark themes without any setup.

The honest catch

The counts aren't exact. To count each reader once, we'd have to recognise them when they come back, and that takes a cookie or a stored ID. We left both out.

So someone who reloads the page sees the buttons unpressed again. And because the server forgets who reacted at the start of every hour, a reader who comes back later can react a second time. The numbers show you which posts readers liked, and roughly how much. Don't use them for anything that has to add up precisely.

Running it yourself

Pagemoji is MIT-licensed, and the code is on GitHub:

GitHub - magicpages/pagemoji: Open-source emoji reactions for any web page. Use the hosted server or self-host it.
Open-source emoji reactions for any web page. Use the hosted server or self-host it. - magicpages/pagemoji

The hosted server is free for anyone, Magic Pages customer or not. If you'd rather keep the counts on your own server, it runs as a single Docker container with a SQLite file, and the repository has the setup. The widget is also on npm as @magicpages/pagemoji, if you want to bundle it into your own site.

PS: the GIF on top is inspired by one of Mariia's favourite TV shows, Game Changer. If you know, you know... And if you don't know, you should watch it 😉

Jannis Fedoruk-Betschki

Written by

Jannis Fedoruk-Betschki

Founder of Magic Pages. I build reliable Ghost hosting, so publishers can focus on what they do best − creating. When I'm not improving the platform, I'm probably helping a customer get their site just right.

You Might Also Like

Creating a custom 404 page for your Ghost site

Ghost's default 404 page is a dead end. It works, but it looks nothing like your site, and it gives the visitor almost nowhere to go. The good thing is, that you can easily replace it with a single file.

5 min read

WordPress to Ghost: is it worth it?

WordPress can do anything − and maintaining all of it is the job. An honest look at whether moving your blog to Ghost is worth it: what you gain, what you give up, and how to migrate without losing your SEO rankings.

7 min read

Websites powered by Magic Pages

From personal blogs to growing businesses — published with Ghost®, hosted with care.

Loading showcase sites...

Start Your 14-Day Free Trial

No credit card required