White paper
How we built Black Box Personalization
From a blank repository to a live, consent-gated personalization site.
Neil Black. This paper is the build log of the site itself. It starts from an empty repository, names the stack that is actually in the code, and follows a visit from the browser through consent, the dataLayer, the first-party beacon, and the rules that change the page. It does not invent traffic numbers. The bugs it describes are the ones the repository fixed.
In the paper
- 01From a blank repository
- 02The stack
- 03How a visit is shaped
- 04The collection layer
- 05Consent
- 06The Lab
- 07Personalization rules
- 08What broke, and what changed
- 09What is unfinished

The shape of a visit
Browser
Consent, the dataLayer, and the rules that change the page.
Vercel
The request, plus approximate place headers when they exist.
Next.js
Beacons, enrichment, Auth.js, and the lab pages.
Neon
Postgres through Drizzle. SQLite only on a local machine.
GA4
Consent Mode. Measurement hits leave only after Accept.
Resend
Contact mail, and the signed link to this paper.
Get the PDF
Name, email, and company are required. The download on the next page is a signed link that expires in seven days. Black Box Personalization emails that same link when Resend is configured.