I lost a week of analytics data last month, and the bug was a single string. Not a broken deploy, not a JavaScript error, not a server outage. I had pasted the wrong Google Analytics measurement ID into every page of my site, and nothing in the pipeline noticed.
How it happened
I run a small free tool site, ramrom.io, built in plain PHP on shared hosting. When I set up Google Analytics, I created the property, copied the measurement ID from the dashboard, and dropped it into the tracking snippet on each page. The ID I copied belonged to a different property — one I had created earlier while testing and never deleted. The tag worked perfectly. It fired on every page view and reported it all faithfully to a property I never opened.
That is the nasty part. A wrong measurement ID does not throw an error. There is no failed request, no console warning, no broken layout. The gtag.js script loads, the config call runs, and the browser sends beacons to google-analytics.com exactly as designed.…