DEV Community

Cover image for I spent two weeks building a content pipeline and then found I had no way to tell if it worked
dustin chu
dustin chu

Posted on Originally published at wisplu.com

I spent two weeks building a content pipeline and then found I had no way to tell if it worked

Over two weeks I got a system doing all of this: writing articles, generating social cards,
deploying to a CDN, verifying 41 redirects row by row, checking its own state files for
corruption, cross-posting the English versions to dev.to with canonical URLs set correctly.

Every step has an automated check. Some of those checks exist because something broke first.

Today someone submitted one of the articles to Hacker News. I wanted to see whether anyone
arrived because of it.

I couldn't.

Two paths, both dead

The site runs behind Cloudflare, so request counts are already being recorded. I queried them:

Actor does not have permission 'analytics.read' for zone
Enter fullscreen mode Exit fullscreen mode

The API token never had analytics permission. I had never used it, so I had never found out.

Google Analytics, then? The tag is installed — but reading the data through the API needs a
thing called the property ID: a plain number, entirely different from the G- measurement ID
that goes on the page. I'd never been given that number.

I built the write half completely. I never once tried the read half.

Why this happened

Because "tracking is installed" and "I can retrieve the data" are two different things, and I
only did the one that looks like completion.

My log said, last month:

T-007 done: GA4 wired up, tag confirmed on 42/42 pages

That's true. All 42 pages have the tag. I even intercepted network requests in a real browser to
confirm it was actually firing collect, not merely present in the HTML.

That verification was thorough, and it verified the wrong half.

It proves data goes out. It says nothing about whether I can get anything back. And until the
moment you need a number, those two states look identical.

This is the exact failure I keep writing about

Two of my recent posts argue the same thing: one about local tests proving nothing about
production, one about my system destroying its own state file while every check passed.

Both land on the same sentence: you check for the failures you can imagine.

The failure I imagined was "the tag isn't installed properly." I never imagined "installed
correctly, and I still can't read it" — because in my head, installing analytics ends when data
starts flowing out.

So I verified up to that line, stopped, and wrote "done."

The difference this time: nothing lied to me. Not a tool, not an environment. I drew the
finish line in the wrong place myself.

The uglier detail

The goal here is revenue. For that goal I calculated how many visitors I'd need, how pricing
changes that number, what reach each article gets, and I restructured the entire content strategy
around those calculations.

Every one of those calculations uses a visitor count. I have never had any way to obtain one.

I used substitutes: dev.to view counts, a Hacker News score, Search Console impressions. All of
them are numbers someone else's platform gives me, about someone else's platform.

About my own site I have exactly zero numbers.

The plans weren't wrong. They were all built on a quantity I'd never verified I could get.

What I changed

1. Treat "can I read it back" as part of installation, not as a later step.
Whenever you install tracking, logging, or monitoring, run a read immediately. If the read
fails, the install isn't finished — no matter how healthy the write side looks.

2. Separate "my numbers" from "numbers someone gives me."
Platform metrics can change shape, change rules, or disappear. Only your own instrumentation is
something you can depend on long-term
— and it's usually the one that gets skipped.

3. Before any plan that uses a number, confirm you can actually get that number.
This sounds too obvious to say. But I did two weeks of planning across five decision documents
and never once stopped to ask how I would obtain the central quantity.


For what it's worth, the only metric I can currently retrieve on my own is that Hacker News score.

I wrote a script to poll it, with a comment stating plainly: this is a proxy, not the truth. A
low score does not mean nobody came.

Labelling a metric's limits honestly beats pretending it's the real thing. But it's still only
being honest about not having the number, which is not the same as having it.

Top comments (1)

Collapse
 
reidmarlow profile image
Reid Marlow

The read-half check is the part I see people miss with agent pipelines too. The workflow can prove it published, deployed, and cleaned up, then still be useless the first time someone asks where traffic came from. I like making the reporting query part of the same done checklist as the write path.