// book 66
patriola.com

Book 66 · Patriola’s Guide to Claude

Email Engagement Scoring


A real, deployed nightly job in a Laravel newsletter application that turns two raw event streams — opens and clicks — into one number per subscriber. A formula simple enough to verify by hand, and honest about exactly what that number can and can't tell anyone who looks at it.

Buy Ebook on Amazon

Patriola's Guide to Claude — Email Engagement Scoring: Turning Opens and Clicks Into One Honest Number
What this book is

One number, built from a handful of lines

Two companion books in this series already cover a real, deployed Laravel newsletter application from two other angles. This book covers a third, much smaller slice of that same application: a single nightly job that turns two raw event streams, opens and clicks, into one number per subscriber. Small in scope, real in every line, and honest about exactly what that number can and can't tell anyone who looks at it.

The job itself is a handful of lines: query how many times a subscriber opened mail in the last thirty days, query how many times they clicked a link, run both counts through a short formula, and save the result. Nothing about it is clever, and that's the point worth teaching — a scoring system doesn't need to be sophisticated to be useful, and a formula simple enough to compute by hand from two numbers is a formula every person on the team can actually reason about, rather than one only its author fully understands. What makes the number trustworthy is everything sitting around it: the two tracking endpoints that generate the raw events, a real guard against one of those endpoints being turned into an open redirect, an admin dashboard that turns the same events into fleet-wide health signals, and a genuinely careful privacy design that lets a subscriber be forgotten without silently corrupting the statistics everyone else's numbers depend on.

What you’ll learn

Six chapters, from the raw events to the score's real limits

  • the-tracking-layer — The two tracking endpoints that produce every event this book's numbers are built from, and a guard that keeps one of them from being abused.
  • a-formula-simple-enough-to-verify-by-hand — The scoring formula itself, small enough to verify by hand from its two inputs.
  • running-it-nightly — The nightly batch job that actually runs it, and the deliberate choice to recompute the full window from scratch every time.
  • what-the-numbers-actually-tell-you — What the same raw events look like from an admin dashboard's point of view, including one metric that has nothing to do with subscriber engagement at all.
  • forgetting-without-losing-the-count — A real, carefully asymmetric privacy design: what happens to a subscriber's tracked history when they ask to be forgotten.
  • what-this-score-cant-tell-you — The score's real limits, named plainly, alongside what it's genuinely good for.
From the book

A preview

A formula simple enough to compute by hand from two numbers is a formula every person on the team can actually reason about, rather than one only its author fully understands.
Who it’s for

Anyone building newsletter analytics with Claude

This is for anyone building email or newsletter analytics with Claude who wants a scoring system the whole team can actually verify, plus an honest look at what happens to that scoring the moment privacy requests enter the picture.

A longer excerpt is available to newsletter subscribers.

Buy Ebook on Amazon

Stay current

New books in this series

One short email per book launch.