Building Weather Embed Analytics with Bunny CDN
Building Weather Embed Analytics with Bunny CDN

Subscribe for Updates

Get notified about new posts on MatthewHall.com

Powered by Publish Perks

Weather Embed is one of my favorite side projects over the last few years—a simple micro-SaaS for displaying the current weather in an image.

I’ve slowly been iterating on it and discovering what features would drive user value. I’ve been figuring out how to achieve this with the platform where it was initially built. I had designed it to generate the images for the weather as rarely as possible to lower the server load. The initial implementation relied on Cloudflare’s CDN functionality to cache each customer’s weather embed.

The issue with the Cloudflare caching being in place is that I need to know when the image has been viewed! The request never makes it to our servers, so I never see it happen.

So, to get this information, I need to rely on the CDN. Sadly, Cloudflare keeps the required functionality behind a costly Enterprise pricing plan, so it was time to find a new CDN that better fits our needs.

After comparing a few different CDN options, I settled on Bunny! They checked all of my boxes:

✅ Request Logs in the base plan

✅ No minimum monthly fee

✅ Great worldwide presence

✅ Reputable brand with high reliability

Bunny offers the ability to store all request logs on their provided cloud storage, letting us download them every few hours, check for new views, and then store them in our database. From there, it was just a matter of generating charts in the web application!

Weather Embed Analytics

I’ve also added a handy weekly report that gets delivered to our user’s inbox at the start of every week, letting people see the traffic their Weather Embed has received!

Weather Embed Email Updates

Have ideas for other features for Weather Embed? Let me know!

Subscribe for Updates

Get notified about new posts on MatthewHall.com

Powered by Publish Perks

comments powered by Disqus