🏡 Remote jobs 💼 Companies ☕️ Leadership 📬 Newsletter 📝 Blog 🏙 Cities 🌎 Countries 🎙 Interviews 🛠 Tools 🧭 Explore 📊 Statistics ✏️ Stories 👋 About
Founder

I started to track my newsletter stats

I started to track my newsletters to see how many people are reading them. I’ve also published live newsletter stats for everyone to see.

I enjoy reading Product Hunt’s daily newsletter – it highlights what’s happening in tech through new product launches in a short and fun way (there are gifs).

I thought that it would be cool to have a similarily fun newsletter about remote work and I’ve been occasionally writing this for 6 months now.

Although it started out as a daily letter, it’s now more like weekly. Or actually, I send it every... sometimes. Well okay, I’ve sent 37 newsletter so far.

These newsletters are sent by email (obviously), but they are also visible on my site so that people who are not subscribed can also read them. And it’s good for my search engine rankings too.

But I wanted to know how many people are actually reading these newsletters from their inbox. I’ve been recently working on my Open Startup pages and so I’ve now created a new section for newsletter statistics that shows:

Total newsletter subscribers + new subscribers in 1d and 30d
Average open rate %
Average click rate %
Chart with new subscribers
List of newsletters and how many of them were actually delivered, opened and clicked

I’ve also added live stats to newsletters displayed on RemoteHub, so people who are reading newsletters online can see how many people got the letter, how many of them opened it and how many were clicked on

How I built this?

RemoteHub is built in PHP on Laravel and I’m using Mailgun to send emails. I set up Mailgun webhooks that notify my API about email deliveries, opens and clicks.

This means that Mailgun notifies me with a HTTP POST request when it detects an email delivery, open or click.

I have a newsletter_mails datatable where I store all newsletter emails that I send. When sending out an email, I store swift_message_id that let’s me later connect events with corresponding emails.

I’ve added delivered_at, opened_at and clicked_at columns to my newsletter_mails table and will fill them whenever event comes in.

And there’s also a robot (cron script) that sums all deliveries, opens and clicks to store them in my newsletters table for stats

You can see these stats on my /open/newsletter page. At the time of writing, I only have yesterday’s newsletter numbers that are still increasing, so it’s too soon to make any conclusions. Robot continues to update newsletter stats for a week and then drops it – I don’t think many people are reading emails from more than week ago.

Related Founder Articles