jacobobryant / platypub

A publishing platform built with Biff
MIT License
65 stars 13 forks source link

Show stats for previous newsletter sends #50

Open jacobobryant opened 2 years ago

jacobobryant commented 2 years ago

Currently Platypub does not record any information when you send a newsletter. It'd be nice to show, somewhere (for now, perhaps add a link next to "subscribers" on the newsletter tab), a list of the previous posts you've sent out to your newsletter(s), along with the standard metrics like open rate and click-through rate (this would require that open and click tracking have been enabled in mailgun--I've done this for my own domain but I don't think I've mentioned anything about it in platypub's docs yet. There's a toggle for it in mailgun, and I think you have to set up some additional DNS records).

We might not even need to add anything to platypub's DB. e.g. with mailgun's api, can we get a list of the emails that have been sent to a newsletter's address? And use the subject line to infer which post it was for? And then get open rate + click through rate for that send? If so, how long can we get that info from mailgun? Maybe we need to store it in platypub's db anyway for longevity.

jacobobryant commented 2 years ago

At a minimum, actually showing a history of previous sends would be nice.

jacobobryant commented 2 years ago

For now this could be added as another page, with a link next to the existing "Subscribers" link.