<!-- Generated from typed source content. Do not edit this file. -->
# 99% Fewer Data Errors

> How a checker inside a shared spreadsheet stopped bad campaign links at the moment of entry — and broke an endless correction loop before reporting.

- Author: Paul Yu
- Role: Senior Analytics Engineer
- Employer: Viral Nation
- Year: 2025
- Theme: Prevention
- Human article: [https://paul-yu.com/case-studies/campaign-data-quality](https://paul-yu.com/case-studies/campaign-data-quality)
- Structured data: [https://paul-yu.com/agent/case-studies/campaign-data-quality.json](https://paul-yu.com/agent/case-studies/campaign-data-quality.json)

## Evidence

| Value | Measure | Evidence level |
| --- | --- | --- |
| ≈99% | fewer manual entry errors | Manager reviewed |
| 6m → 15 to 30s | scan processing time | Repository backed |
| 17 | accepted social link shapes | Repository backed |
| 0 | added headcount needed to scale | Manager reviewed |

## Situation

Teams pasted social post links into a shared sheet for brand campaigns. One bad link, missing field, or duplicate post could travel into reporting without a warning and cost days of cleanup.

## Task

Catch mistakes at the moment of entry, explain how to fix them, and keep a record of each check for operations and reporting teams.

## Action

I built Sentry, a Google Sheets checker that validates links, extracts stable post IDs, flags duplicates, runs the right field rules after an edit, and logs the result.

## Result

Manual entry errors fell by about 99% in a manager-reviewed outcome. Scan time dropped from about six minutes to 15–30 seconds in project history, and the programs scaled without adding headcount.

## System flow

Campaign input → Automated validation → Issue feedback → Trusted rows

## Technical notes

### Hash-indexed duplicate detection

Sentry scans the post IDs once and puts them in a lookup map. Each new row can then be checked in O(1) average time without searching the whole sheet again.

### Event-driven validation

Different triggers handle edits, changes to the sheet, and scheduled checks. Humans see a problem near the point of entry rather than finding it days later in a report.

### Role-based access control

Each role has a short list of allowed actions. Humans can do their part without getting full control of the shared workflow.

## Ownership

I built Sentry and supported the teams using it. A separate later system handled bulk approval; that work is documented in its own case study.

## Limitations

The impact numbers come from my year-end manager review. They were not measured in a controlled experiment. The 20-day-to-one-hour approval result belongs to a later system, not Sentry.

## Takeaway

The cheapest data error is the one caught at entry. A checker that speaks up while the person is still in the sheet saved cleanup time without removing human judgment.

## Tools

Google Sheets, Google Apps Script, JavaScript, Regular expressions, Map / Set, Audit logs
