A website's data layer and tags before release
On a synthetic website, a browser check before release stopped 3 of an independent author's 5 tracking breaks, all that came through a site build or tag publish.
Main limitation Three breaks are too few to say how often it would miss one; without it, monitoring's automated checks found all 5 within 2 days in the base case, the main settings fixed before the test, but at a third of the traffic, in 16 of 20 runs, they missed 2 of the 5 for all 28 days. The B2B site and its releases, traffic and thresholds are the study's choices, and the author wrote its 12 releases in a single run; 2 of its 5 breaks send the same hits as one of the study's own, among them the only one the data layer check stopped, and the study coded the checks after reading the author's releases, though the design had fixed their assertions first.
A website can report wrong numbers while every page still works. The study ran 39 real code changes to a small site, 12 of them by an independent author, through scripted visits in a headless browser, so the truth behind every hit is known. A check of the data layer alone let through one of the 3, a guide request whose hit never left the browser. Damage is counted in wrong metric-days: each of seven reported metrics scores one for every day it is materially wrong. The author's breaks were all loud, each making a metric wrong from its first day; some breaks in the study's own releases were quiet, and monitoring's automated checks never found two of them in 28 days. My pick: check what leaves the browser before every site build and tag publish, keep monitoring for changes that pass through neither, and on a site with a third of this traffic, replay the same sessions each morning, a choice made after the results that rests on one break.
The independent author's breaks stopped by the full browser check
3 of 5
a self-test on the study's own releases: 17 of 19, again all that went through a site build or tag publish | The same breaks stopped by the data layer check alone
1 of 5
it runs only on site builds, which carried 2 of the 5. 4 of 19 on the study's own releases | Wrong metric-days on the author's breaks: monitoring alone, then with the full check
10, 7
scored with each fix landing the day of the alarm, a best case for monitoring. A fix 1 day later gives 20 and 14, 3 days later 40 and 28 | Slowest find by monitoring, the author's breaks, base case
day 2
median day 1. The price: alarms on 5 to 11 of 42 clean days |
3 of 5 stopped before release
- Reset the guide form after submission: stopped; stopped by the full check; the data layer check let it through
- Use the stored plan value in the demo tag: stopped; a tag publish, stopped by the full check; the data layer check does not run on one
- Share resource navigation rendering: stopped; stopped by both checks before release
- Simplify the campaign redirect: shipped; a redirect rule, with no release to check; in the base case monitoring found it on day 1 in every run
- Update saved consent handling: shipped; a vendor script, with no release to check; in the base case monitoring found it on day 1 in every run
Every release, and what each check did with it, is in the table under What each check did, release by release.
This is a second round of Event contracts before release, which asked the same question on an app. Other metrics and another way of shipping, so the metric-days here do not compare with that page.
How many metric-days each way of checking left wrong
Each bar sums wrong metric-days over the metric-breaking releases in the 28 days from each release, as the mean of 20 runs, with a line from the lowest to the highest run. Left alone, the author's 5 breaks leave 287, and the 19 in the study's own releases leave 1,171. The two sets are never pooled.
- The study's own releases (19 breaks)
- Releases by an independent author (5 breaks)
| Way of checking | Stopped before release | Stopped, counting the locked form | Found after release | Not found in 28 days | Median days to a find | Wrong metric-days, mean | Lowest to highest run |
|---|---|---|---|---|---|---|---|
| Dashboards only | 0 of 5 | 0 of 6 | 4 | 1 | 1 | 41 | 37 to 47 |
| Monitoring after release | 0 of 5 | 0 of 6 | 5 | 0 | 1 | 10 | 10 to 11 |
| Data layer check, then dashboards | 1 of 5 | 1 of 6 | 4 | 0 | 1 | 10 | 9 to 12 |
| Data layer check and monitoring | 1 of 5 | 1 of 6 | 4 | 0 | 1 | 9 | 9 to 10 |
| Full browser check and monitoring | 3 of 5 | 4 of 6 | 2 | 0 | 1 | 7 | 7 |
| Full check, monitoring and a morning replay | 3 of 5 | 4 of 6 | 2 | 0 | 1 | 7 | 7 |
The same table for the study's own releases
| Way of checking | Stopped before release | Found after release | Not found in 28 days | Median days to a find | Wrong metric-days, mean | Lowest to highest run |
|---|---|---|---|---|---|---|
| Dashboards only | 0 of 19 | 16 to 17 | 2 to 3 | 1 | 119 | 96 to 144 |
| Monitoring after release | 0 of 19 | 18 to 19 | 0 to 1 | 1 | 57 | 40 to 88 |
| Data layer check, then dashboards | 4 of 19 | 14 to 15 | 0 to 1 | 1 | 56 | 38 to 76 |
| Data layer check and monitoring | 4 of 19 | 14 to 15 | 0 to 1 | 1 | 51 | 36 to 72 |
| Full browser check and monitoring | 17 of 19 | 2 | 0 | 1 | 6 | 5 to 7 |
| Full check, monitoring and a morning replay | 17 of 19 | 2 | 0 | 1 | 6 | 5 to 7 |
Every arm keeps a dashboard reader (under Terms). Found means an alarm, on or after the release day, on something the release affected, that the clean build on the same seed and day does not raise. Two parts of that rule favour monitoring, so read its figures as a best case: the fix lands the day the alarm fires, and the clean build, which a real team does not have, credits the dashboard reader only when its line is not crossing on noise. What moves the result moves both. The locked form column counts the author's form guard, a real loss that breaks no metric.
What it means
A check stops what it names, by construction. A value of the wrong type fails a schema because that is what a schema does, so a stop is not a finding in itself; what is measured is what each check lets through. The same study wrote the sessions and its own releases, so 17 of 19 on the study's own releases is a self-test.
A check of the data layer alone misses what happens after the data layer. The design said that if the data layer check stopped most of the author's breaks, a schema on the data layer would be enough, and that if the full check stopped no more than it, the 14 sessions would only fit the breaks the study imagined. Neither happened (1 and 3 of 5), but only one break sets the two checks against each other on a build both ran on: a form reset left the push right and emptied the field the guide tag needs, so the data layer check passed while the hit never left. Of the full check's two other stops, one is the data layer check's only stop, a shared route that lost its page views, and the other a tag publish, a channel the data layer check never runs on. If you can only afford one thing, capture what leaves the browser.
The design's test of monitoring needs quiet breaks, and only the study's own releases have them. It was set in advance: "If monitoring found quiet breaks within 2 days, the case for a pre-release check would rest on avoiding the first day's damage." Each of the author's breaks made a metric wrong on its first day in every run, so that set cannot run the test. The study's own releases can, and the condition did not hold: the lost double-submit guard took up to day 16, a visitor cookie that lost its site-wide path up to day 8. Monitoring's own checks missed the guard and the cookie path in 8 of 20 runs each, and a plan value sent per month and the monthly billers' value in all 20. So on the study's own releases the case for a check before release rests on more than the first day's damage, though this is the self-test set.
Read after the results: on the author's set the full check saved few metric-days, at the floor. It took those breaks from 10 to 7 wrong metric-days. A find on the first morning still counts the first day, and between them the author's breaks make an average of 10.1 metrics wrong on it, 7 on the 2 no check before release can stop. So the saving is the stopped breaks' first days, and it grows with each day a fix takes.
The morning replay helped only where monitoring was slow. Without the dashboard reader it helped on the study's own releases in the base case, 5.6 wrong metric-days against 6.5, and on both sets at a third of the traffic, under What I would pick.
Wrong metric-days undercount three of these. Tags that stop waiting for consent (one of the study's own releases) send data about people who refused, and a vendor update that keeps analytics on after a reject does the same from outside any release: by the time monitoring finds them, the hits have gone, a compliance harm the count does not price. The third, the author's locked form, is valued next.
What it is worth, on costs set after the results. From the first round, US$100 an hour, 120 setup hours (60 to 240 in the range, since the first round's were for app sessions) and 1 hour per release checked and per alarm on a release that broke nothing, the locked form's alarm counting as a stop rather than noise. On the author's 12 releases the check costs US$13,000 against 3.15 wrong metric-days avoided beyond monitoring, so it pays on metric-days only if one costs more than about US$4,127, or US$199 to US$7,937 across fix times, release counts and setup hours (US$39 to US$526 on the study's own releases), a cost this study does not measure. The locked form is valued apart, as pipeline: under monitoring alone it ran until an alarm on day 1 to day 14 (1 run in 20 had none in 28 days). Stopping it before release saves about US$47,000 of pipeline with a find on the first morning, US$256,000 on the average run and US$532,000 at the slowest find. Pipeline here is a year's contract value, so for that one stop to cover the check's US$13,000, more than 27.9%, 5.1% or 2.4% of it would have to turn into first-year gross profit (win rate times gross margin), a rate this study does not measure. Two simplifications pull opposite ways: the pipeline counts only visitors who accept tracking, while the lock turns away the others too, which lowers the shares needed; and it assumes a visitor the lock turns away never reaches sales another way, which raises them.
What I would pick. Capture outgoing hits in scripted sessions before every site build and tag publish, across consent choices, a campaign entry and a phone layout, and keep monitoring after release for changes that pass through neither. On a site with a third of this traffic, add the morning replay too: there monitoring's automated checks missed the campaign redirect in most runs and the replay found it on the first morning, so without the dashboard reader the replay cut the author's breaks from 28.2 wrong metric-days to 7.0, and the study's own releases from 20.1 to 4.7. On the author's set that rests on one break, and it was chosen after reading the results. On these releases the sessions earn their place on consent and on lost leads more than on metric-days saved.
Terms used on this page
- Data layer
- The list the page fills with what happened. Nothing leaves the browser from here on its own.
- Tag layer
- The code that reads the data layer and decides what to send and when, under its own configuration.
- Hit
- One outgoing request to the collection endpoint. Metrics are computed on the hits that land.
- Data layer check
- 3 scripted sessions on each site build, asserting every push against the schema and the events each session should push. It never looks at what leaves the browser.
- Full browser check
- 14 scripted sessions on each site build and tag publish, which also assert the outgoing hits: one per event, the right campaign and value, none without consent.
- Morning replay
- The same 14 sessions each morning against the live site, so it sees any channel, after the fact.
- Monitoring
- Its automated checks, also called its own checks, run daily on landed hits: schema failures, each event's volume against the same weekday and each metric against its spread over 28 days. Its figures also credit the dashboard reader unless they say "own checks" or "automated checks".
- Dashboard reader
- A person who notices a metric more than 30% from its mean over the previous 28 days. Every way of checking keeps one; the note under the chart says when its finds count.
- Base case
- The settings declared before the test: this traffic, every release on the first working day of the week and each fix landing the day of the alarm.
- Release
- Any change scored here. Site builds and tag publishes pass through a release step a check can run on; redirect rules and vendor script updates have none, so they ship outside a release.
- Metric-breaking release
- A release that, left alone, makes at least 3 metric-days wrong in 28 days.
The written framework behind the tracking
Every check here is held to one written standard: a measurement framework from business question to event, an event list and a data layer specification, all in the framework file, with machine-readable versions for the data layer and the hits. The site's source includes its page code, tag layer and tag configuration.
| Business question | Metric | Read from |
|---|---|---|
| Is the site reaching people? | Visitors a day | page_view |
| Do they read, or leave? | Pages per visitor | page_view |
| How much sales demand does the site make? | Demo requests a day | demo_request |
| Does the pricing page move people to talk to sales? | Pricing to demo conversion | page_view on pricing, demo_request |
| Are paid campaigns earning their budget? | Paid share of demo requests | the channel on demo_request |
| How large is the demand? | Pipeline value a day | the annual value on demo_request |
| Does content make leads? | Guide leads a day | asset_download |
What carries over to any tag manager, and what does not
The tag layer here is a small open script of about a hundred lines, written for this study. No commercial tag manager was tested, and this round names none.
Carries over
- The three layers where a break can sit: what the page pushes, what a tag rule does with it, what leaves the browser. Assertions on the first alone miss the other two.
- Testing outgoing requests in a real browser, which works with any tool, since the test only needs the requests; crossed with consent choices, campaign entries and a phone layout, each hit matched to its event by an id.
- Sorting changes by channel: site builds and tag publishes can be checked before release; redirect rules and vendor script updates are left to monitoring or a morning replay.
- Scoring past changes in wrong metric-days and days to a find, with false alarms counted on clean days.
Does not carry over
- Any real tool's preview mode, versions, built-in triggers or permissions. Here a tag publish is tested by loading its configuration; a real preview may differ from what publishes.
- Anything a real tool does after collection: sampling, modelling of unconsented visitors, attribution, processing delays. Here a hit lands or it does not, and 98.5% land.
- Server-side tagging, other browsers' cookie and privacy rules, ad blockers beyond that flat loss, a real consent platform, and identity across visits.
What each check did, release by release
Every release was scored on its own against the clean build, in 20 runs. Days count from the release: day 1 is the morning after. Under "no" the figure is the noise a harmless release still accrues against the tolerance.
| Release | Ships as | The author expected a break | Breaks a metric (wrong metric-days left alone) | Data layer check | Full browser check | Monitoring | Scripted visits stopped, with a page error |
|---|---|---|---|---|---|---|---|
| Refresh the home page | site build | no | no, 1.1 | passed | passed | alarm day 1 to 5 | 0, 0 |
| Defer home page scripts | site build | no | no, 1.8 | passed | passed | no alarm | 0, 0 |
| Reset the guide form after submission | site build | yes | yes, 30 metric-days | passed | stopped before release | found day 1 to 2 | 0, 0 |
| Use the stored plan value in the demo tag | tag publish | yes | yes, 30 metric-days | does not run on this channel | stopped before release | found day 1 | 0, 0 |
| Simplify the campaign redirect | redirect rule | yes | yes, 30 metric-days | does not run on this channel | does not run on this channel | found day 1 | 0, 0 |
| Update saved consent handling | vendor script | yes | yes, 168 metric-days | does not run on this channel | does not run on this channel | found day 1 | 0, 0 |
| Share resource navigation rendering | site build | yes | yes, 30 metric-days | stopped before release | stopped before release | found day 1 | 0, 0 |
| Increase Growth pricing | site build | no | no, 2.0 | passed | passed | alarm in 5 of 20 runs, day 1 to 12 | 0, 0 |
| Publish a certificate checklist | site build | no | no, 1.9 | passed | passed | alarm in 18 of 20 runs, day 1 to 7 | 0, 0 |
| Retire form interaction tags | tag publish | no | no, 2.0 | does not run on this channel | alarm before release | alarm day 1 to 2 | 0, 0 |
| Add a legacy demo redirect | redirect rule | no | no, 2.0 | does not run on this channel | does not run on this channel | no alarm | 0, 0 |
| Upgrade form submission guarding | site build | yes | no, 2.4 | passed | alarm before release | alarm in 19 of 20 runs, day 1 to 14 | 32, 0 |
Every one of the study's own releases
| Release | Ships as | Breaks a metric (wrong metric-days left alone) | Data layer check | Full browser check | Monitoring | Scripted visits stopped, with a page error |
|---|---|---|---|---|---|---|
| Demo form's email field renamed | site build | yes, 113 metric-days | passed | stopped before release | found day 1 | 0, 0 |
| Client-side route change sends no page view | site build | yes, 31 metric-days | stopped before release | stopped before release | found day 1 | 0, 0 |
| Back button in resources sends no page view | site build | yes, 30 metric-days | stopped before release | stopped before release | found in 19 of 20 runs, day 1 | 0, 0 |
| Page view fires twice on every load | site build | yes, 30 metric-days | stopped before release | stopped before release | found day 1 | 0, 0 |
| Form loses its double-submit guard | site build | yes, 20 metric-days | passed | stopped before release | found day 1 to 16 | 0, 0 |
| Consent banner delayed 5 seconds for page speed | site build | yes, 172 metric-days | passed | stopped before release | found day 1 | 0, 0 |
| Events held before consent are dropped | site build | yes, 81 metric-days | passed | stopped before release | found day 1 | 0, 0 |
| Tags no longer wait for consent | site build | yes, 159 metric-days | passed | stopped before release | found day 1 | 0, 0 |
| Campaign redirect loses its UTM parameters | redirect rule | yes, 29 metric-days | does not run on this channel | does not run on this channel | found day 1 | 0, 0 |
| Clean URLs: the site strips the query string on load | site build | yes, 29 metric-days | passed | stopped before release | found day 1 | 0, 0 |
| Annual value sent as formatted text | site build | yes, 29 metric-days | stopped before release | stopped before release | found day 1 | 0, 0 |
| Plan value sent per month, not per year | site build | yes, 29 metric-days | passed | stopped before release | found day 1 to 4 | 0, 0 |
| Plan choice not recorded on phones | site build | yes, 28 metric-days | passed | stopped before release | found day 1 to 2 | 0, 0 |
| Demo tag's trigger renamed in a tag clean-up | tag publish | yes, 112 metric-days | does not run on this channel | stopped before release | found day 1 | 0, 0 |
| Channel fields dropped from the demo tag | tag publish | yes, 29 metric-days | does not run on this channel | stopped before release | found day 1 | 0, 0 |
| A copied page view tag fires beside the original | tag publish | no, 2.2 | does not run on this channel | alarm before release | no alarm | 0, 0 |
| Vendor update makes Reject keep analytics on | vendor script | yes, 135 metric-days | does not run on this channel | does not run on this channel | found day 1 | 0, 0 |
| Campaign values kept for the landing page only | site build | yes, 30 metric-days | passed | stopped before release | found day 1 | 0, 0 |
| Visitor cookie loses its site-wide path | site build | yes, 58 metric-days | passed | stopped before release | found day 1 to 8 | 0, 0 |
| New article event, specification updated with it | site build | no, 2.2 | passed | passed | no alarm | 0, 0 |
| Page title added to page views, specification not updated | site build | no, 2.2 | alarm before release | alarm before release | no alarm | 0, 0 |
| Internal refactor, events unchanged | site build | no, 2.1 | passed | passed | no alarm | 0, 0 |
| Currency dropped from the plan tag | tag publish | no, 2.1 | does not run on this channel | alarm before release | alarm day 1 | 0, 0 |
| Articles labelled blog in page views | site build | no, 2.5 | alarm before release | alarm before release | alarm day 1 | 0, 0 |
| Pricing page redesign: more people book a demo | site build | no, 1.3 | passed | passed | alarm day 1 to 2 | 0, 0 |
| Home page headline change: more people leave at once | site build | no, 2.9 | passed | passed | alarm day 1 to 2 | 0, 0 |
| Monthly billers' annual value sent as one month | site build | yes, 26 metric-days | passed | stopped before release | found in 16 of 20 runs, day 1 to 26 | 0, 0 |
One break, from the release to the metric
The independent author's release, in its own words: The forms team clears the guide form after validation so the entered address is not left visible during the request. The author expected it to break a metric, and it did. In this session recorded in the browser, the data layer holds 1 guide event under the release, as on the clean build, and the outgoing hits hold 0.
| Recorded | Events, in order |
|---|---|
| Data layer, clean build | page_view, consent_update, consent_update, page_view, page_view, consent_update, page_view, form_start, asset_download, consent_update, page_view |
| Data layer, under the release | page_view, consent_update, consent_update, page_view, page_view, consent_update, page_view, form_start, asset_download, consent_update, page_view |
| Outgoing hits, clean build | page_view, page_view, page_view, page_view, form_start, asset_download, page_view |
| Outgoing hits, under the release | page_view, page_view, page_view, page_view, form_start, page_view |
| Day from the release | True guide leads | Landed under the release | Landed on the clean build |
|---|---|---|---|
| 1 | 38 | 0 | 38 |
| 2 | 56 | 0 | 56 |
| 3 | 46 | 0 | 45 |
| 4 | 45 | 0 | 45 |
| 5 | 43 | 0 | 42 |
| 6 | 16 | 0 | 16 |
| 7 | 19 | 0 | 19 |
Over that first week of this run, 263 people asked for the guide and 0 landed. Who saw it: the data layer check passed, because the push is correct. The full browser check fails it before release, because a guide session must send one hit. Monitoring, had it shipped, found it on day 1 in the quickest run and day 2 in the slowest, leaving 1.1 wrong metric-days against 29.6 left alone.
Alarms on releases that broke no metric
7 of the independent author's releases broke no metric by the study's rule, and one of them is a real loss. The guard that locks the form after one invalid try loses every visitor whose first try fails: 10% of true demo requests, the share of failed first tries the traffic model assumes for every entry. Truth follows what the visitor did, so no metric is wrong, against the author's expectation. The full check stops it before release, and monitoring raised an alarm in 19 of 20 runs, from day 1 to day 14. The full check's one other alarm was the retired form tags, which drift from the written framework. Monitoring alarmed on 3 to 5 of these releases per run, among them a home page refresh that really changes behaviour: a monitor cannot tell that from a broken tag. On the study's own releases, 8 such releases drew 4 full check alarms and 2 data layer check alarms, on drift from the specification and on a copied tag the metrics count once.
On 42 clean days with no change, monitoring raised an alarm on 5 to 11, and a reader noticing 30% moves would have reacted on 28 to 37, since weekends alone move most daily counts further than that. A release whose hits match the clean build's still counts about 2 wrong metric-days of noise against the tolerance; that noise sits inside every total.
What moves the result
The declared settings, moved one at a time before the results, barely move monitoring's wrong metric-days on the author's breaks: 10.0 to 11.2. Read after the results, they move its speed more. At a third of the traffic, monitoring's slowest find on the author's set is day 5, not 2, and only through the dashboard reader: its own checks find the campaign redirect in 4 of 20 runs and the form reset in 1, missing both in 16, and the reader finds the rest with a line that crosses its band on 36 to 41 of 42 clean days at that traffic. Without the reader, monitoring alone leaves 58 wrong metric-days on the author's breaks there, against 11 with it. The declared sweep credits the reader and hides this, also because the tolerances widen as traffic falls: demo requests may be 25% off before a day counts as wrong, against 12% here. The collapsed table below has each setting's slowest find.
Two inputs that move the metric-days far more were never in that sweep: how long a fix takes after the alarm, and whether the dashboard reader's finds count. This table moves both, after the results. In the base case, leaving out the dashboard reader barely touches the author's set and more than doubles the figure on the study's own releases for monitoring alone.
| Rule for a find | Monitoring alone, independent | Full check and monitoring, independent | With the replay, independent | Monitoring alone, study's own | Full check and monitoring, study's own | With the replay, study's own |
|---|---|---|---|---|---|---|
| As scored: dashboard reader credited, fix the same day | 10 | 7 | 7 | 57 | 6 | 6 |
| Dashboard reader credited, fix 1 day after the find | 20 | 14 | 14 | 98 | 11 | 11 |
| Dashboard reader credited, fix 3 days after the find | 40 | 28 | 28 | 179 | 23 | 23 |
| Monitoring's own checks only, fix the same day | 10 | 7 | 7 | 135 | 7 | 6 |
| Monitoring's own checks only, fix 1 day after the find | 20 | 14 | 14 | 173 | 12 | 11 |
| Monitoring's own checks only, fix 3 days after the find | 40 | 28 | 28 | 249 | 24 | 23 |
The declared settings, one at a time
In the declared sweep, the metric band moves monitoring on the study's own releases from 53 to 70. Three times the traffic lifts it to 69, which looks backwards: with less daily noise the dashboard line crosses its band less often, so it finds the monthly billers' value in 7 of 20 runs against 16. The tight volume band costs the most in false alarms, 13 to 26 of 42 clean days. The tolerance also changes which releases count as breaking.
| Setting | Breaks, study's own, independent | Monitoring alone, independent | Full check and monitoring, independent | With the replay, independent | Monitoring alone, study's own | Full check and monitoring, study's own | With the replay, study's own | Monitoring alarm days on clean days |
|---|---|---|---|---|---|---|---|---|
| As declared | 19, 5 | 10 | 7 | 7 | 57 | 6 | 6 | 5 to 11 |
| Metric band 2 standard deviations | 19, 5 | 10 | 7 | 7 | 53 | 6 | 6 | 6 to 17 |
| Metric band 4 standard deviations | 19, 5 | 10 | 7 | 7 | 70 | 6 | 6 | 4 to 11 |
| Tolerance floor 1% | 20, 5 | 10 | 7 | 7 | 57 | 6 | 6 | 5 to 11 |
| Tolerance floor 5% | 19, 5 | 10 | 7 | 7 | 56 | 6 | 6 | 5 to 11 |
| Traffic times 0.33 | 19, 5 | 11 | 8 | 7 | 54 | 5 | 5 | 5 to 11 |
| Traffic times 3 | 19, 5 | 10 | 7 | 7 | 69 | 6 | 6 | 2 to 7 |
| Landed share 99.5% | 19, 5 | 10 | 7 | 7 | 61 | 6 | 6 | 5 to 11 |
| Landed share 95% | 19, 5 | 10 | 7 | 7 | 59 | 5 | 5 | 5 to 15 |
| Volume band 0.8 to 1.25 | 19, 5 | 10 | 7 | 7 | 56 | 6 | 6 | 13 to 26 |
| Volume band 0.6 to 1.60 | 19, 5 | 10 | 7 | 7 | 57 | 6 | 6 | 1 to 7 |
| Setting | Monitoring alone, independent | Own checks miss, independent | With the replay, independent | Monitoring alone, study's own | Own checks miss, study's own |
|---|---|---|---|---|---|
| As declared | day 2 | 0 | day 1 | day 26 | 2 to 5 |
| Metric band 2 standard deviations | day 1 | 0 | day 1 | day 23 | 0 to 3 |
| Metric band 4 standard deviations | day 2 | 0 | day 1 | day 26 | 3 to 6 |
| Tolerance floor 1% | day 2 | 0 | day 1 | day 26 | 2 to 5 |
| Tolerance floor 5% | day 2 | 0 | day 1 | day 26 | 2 to 5 |
| Traffic times 0.33 | day 5 | 0 to 2 | day 1 | day 28 | 4 to 9 |
| Traffic times 3 | day 1 | 0 | day 1 | day 26 | 2 to 3 |
| Landed share 99.5% | day 2 | 0 | day 1 | day 26 | 2 to 5 |
| Landed share 95% | day 2 | 0 | day 1 | day 28 | 2 to 5 |
| Volume band 0.8 to 1.25 | day 2 | 0 | day 1 | day 26 | 2 to 3 |
| Volume band 0.6 to 1.60 | day 1 | 0 | day 1 | day 26 | 2 to 5 |
What the study predicted before the test, and what held
6 of 7 held, one of them only because more of the author's breaks skip a release. The one that did not: monitoring was to miss two quiet breaks in the study's own releases on most runs, and found them in 20 and 16 of 20 runs; its own checks found the first in 12 runs and the second in none, so the other finds were the dashboard reader's. The design's own tests of what would change the conclusion are under What it means.
All 7 predictions
- The data layer check stops the breaks visible in the data layer of its three sessions, and none that sit in the tag layer, the consent banner, a campaign entry or the phone layout. Held: it stopped 4 of the 19 predicted breaks.
- The full check stops every predicted break except the two that ship outside a release. Held: it stopped 17 of the 19 predicted breaks.
- On the independent author's releases, the full check stops a smaller share of the breaks than on the study's own releases. Held on the point estimate: 60% against 89%, but the gap is the channel mix: 2 of the author's 5 breaks ship outside any release, against 2 of the 19 in the study's own releases, and on the channels it runs on it stopped all of both. The releases were written to a brief, not sampled, so no interval applies, and 5 breaks are too few to rank the two shares.
- Monitoring finds the loud breaks on the first morning, a median of at most 2 days among those it finds, and misses the lost double-submit guard and the monthly billers' value on most runs. Not held: the median was 1 on the study's own releases, but the lost double-submit guard was found in 20 of 20 runs; the monthly billers' value was found in 16 of 20 runs. Monitoring's own checks raised that last one in 0 runs; those finds are the dashboard reader's.
- Monitoring raises an alarm on both real behaviour changes, which break no metric. Held: 0 of 2 broke a metric, and each drew an alarm in 20 of 20 runs. It holds with the double-click rule listed under Method.
- The morning replay finds both breaks that ship outside a release on the first morning. Held: both were found on day 1. Monitoring found them that fast too in the base case, so the replay could not show a difference there.
- Each release's own prediction holds for at least 80% of the study's own releases. Held: 25 of the 27; the misses are the two quiet breaks, the lost double-submit guard and the monthly billers' value.
The study wrote these before any release ran. 9 of the study's own releases ran only after a first scoring of the other 30 had been read; Method lists them.
How I would run this with a team
- One analyst keeps the specification. A marketing analyst keeps the framework and the schemas as files beside the site's code; changing an event means changing those files, reviewed with the web engineer.
- Browser sessions run on every site build. Web engineers own the session scripts in the build; a failure blocks the merge, and the fix is the code or the specification.
- A tag publish passes the same sessions. Marketing operations publish tags on their own schedule, so the sessions run against a preview of the configuration first; nothing else tests a tag publish.
- Consent has a second reader. Legal or privacy reads the reject and ignore sessions' results. A hit without consent is not a metric question.
- Redirect rules and vendor scripts get a change log. Nothing tests them before they ship, so the morning replay and monitoring name the last change on each channel when an alarm fires.
- Roll out in order. Write the specification first, then one session for the money event, then the outgoing hit check, then the consent and campaign states, then the alarm routing, tuning thresholds on clean days before anyone is paged.
Limits
- Synthetic site, synthetic traffic, releases chosen by two authors. The counts show what each check can see, not how often real releases break.
- Few breaks, from one run, in a mix the author's brief set rather than chance: 5 breaks, 2 of them outside any release. Twenty traffic runs measure traffic noise; they do not make those releases a sample. The harder test, not run here, is quiet breaks written by an independent author.
- Overlap. 5 of the author's 12 releases send the same hits as one of the study's own releases: the 2 breaks the main limitation names, the campaign redirect and the shared route, and 3 that send what the clean build sends. The author saw the framework the study wrote.
- Every release ships on the same weekday, the first of the working week, reaches every visitor at once and comes alone; none of that was varied. On weekends guide leads fall under the volume check's minimum of 20 events a day, so a change shipped just before one could be found later than here.
- One session per visitor, so no returning visitors; one browser engine; and traffic expanded from 192 recorded visits, so nothing here is a flaky network or a race seen once in a thousand visits. Redirects are applied by the study's test code, every break stays until found, and no backfill is counted.
Use this at your company
To decide which website tracking checks to run before a release and which after, paste this into an AI assistant along with your tracking plan and a list of past changes to the site and its tags.
This method comes from Diogo Travassos's study "A website's data layer and tags before release" (https://diogotravassos.dev/event-contracts/web-data-layer.html). If you can open links, read it first: it works the method through end to end and shows its checks. The steps below stand on their own if you can't. Help me decide which website tracking checks to run before a release and which after, by replaying our own past changes to the site, the tags, the redirects and the consent banner. The plan: 1. Write the measurement framework: each business question, its metric and the events it reads from. Write the event list and the data layer as a machine-checked schema, with required properties, types and allowed values, and do the same for what leaves the browser. 2. List the last few months of changes that could touch tracking, including tag publishes, redirect rules and vendor script updates that never passed through a site release, and mark which ones moved a metric we report. Before release: 3. Drive a real browser through scripted sessions against a preview: read a page, change route, pick a plan and submit a form, with a failed first try and a double click. Assert every data layer push against the schema. 4. Capture the outgoing requests too, not only the data layer. Assert one hit per event, the right campaign values after a redirect, the right plan and value, and no hit at all after a reject or before a decision. Run the sessions across consent choices, campaign entries and a phone layout, and run them against a preview of any tag publish. After release: 5. Run daily checks on the landed data: schema failures, volume against the same weekday, and the metrics against their recent spread. Replay the sessions each morning against the live site, for changes that never pass through a release. 6. Count each check's false alarms on days with no change, and for each past change, the days until a check would have found it and the wrong metric-days meanwhile. Report back: which past changes each check would have stopped or found and how fast, the false alarms, which changes no check sees, what a consent break costs beyond the metrics, and the limits. In your report, say which study you followed and link it: https://diogotravassos.dev/event-contracts/web-data-layer.html
Method and checks
Data
Synthetic, generated by the code on 20 fixed seeds. Each build runs 192 scripted visits in a headless browser: 4 entries, 4 consent behaviours, 2 devices and 6 paths, each in a fresh context with a fake clock and a seeded random source. Each run records the visitor's actions, every data layer push and every outgoing hit. A day's visitors on each kind of visit are drawn from a Poisson with a mean of 1,400 a weekday times its share, and 98.5% of them land, on the clean build too. The browser fixes what each kind of visitor sends under a build; the draw fixes how many come. The clean build was run twice: 0 of 192 visits differed, and it lands exactly its truth on all of them.
Design, set before the test
- 42 clean days, then one release a week, each scored on its own against the clean build. A release reaches everyone at once.
- Truth comes from what the visitor did in the browser under that build. People who reject or ignore the banner count as zero, since a correct build sends nothing about them.
- A metric-day is wrong when it differs from the truth by more than its tolerance: 2%, or the clean build's own 99th percentile daily error, whichever is larger. A release is metric-breaking at 3 wrong metric-days in 28 days.
- Monitoring: per event, more than 1% failing a required property; volume under 0.7 or over 1.4 times the same weekday's mean over four weeks; a metric beyond 3 standard deviations of the last 28 days.
- The design, the sessions, the study's own releases and its predictions were committed before any result: the design file.
The independent author's releases
An independent author who never saw the checks, the sessions, the visits, the thresholds or the study's own releases wrote 12 releases in one run, as real code patches, from the site's source, the framework and the release format, with its own expectation for each. Its brief asked for releases of the kinds web and marketing teams ship over a few months, some that break a metric and some harmless, some obvious and some subtle, across varied channels. They are kept as written in the author's release file. That one writing run cannot be repeated from the downloads: everything after it can. Scored by the same code as the study's own releases, 0 failed to apply.
Added later, and why
The design was written before the test. These were settled afterwards, the first two before any release was scored and the others after the results.
- A release that really changes a price: truth and the full check's value assertion read prices from the release's own code, not a fixed table.
- The check code. The 14 sessions and the assertions were set in the design before the author wrote anything, but the code that runs them was written after the study had read the author's releases, before any was scored. Each stop on the author's set traces to an assertion the design lists: one hit per expected event (the form reset), the plan and value on the lead hit (the stored value), one page view per page (the shared route) and a session that reaches its end (the locked form).
- Visits a release cannot touch. A rule that copied such visits from the clean build's record would have covered 1,662 visits across 16 builds; here every visit is run in the browser. 55 of them differ in what the scoring reads, on 3 of the author's releases, and 216 differ on 7 builds once data layer pushes count; only the check sessions read pushes, and those were never copied. All 55 are people who reject or ignore the banner, who send nothing and count as zero, so no truth, no hit and no metric-day moves. One count does: the locked form stops 32 scripted visits, 16 more than the copies show.
- The running order, and when the last of the study's own releases ran. All of the independent author's releases ran first, then the study's own releases in an order fixed before any of those ran, harmless ones first because the first fourteen were all predicted breaks. 9 of the study's own releases ran last, after a full scoring of the other 30 had been read: Channel fields dropped from the demo tag; A copied page view tag fires beside the original; Vendor update makes Reject keep analytics on; Campaign values kept for the landing page only; Visitor cookie loses its site-wide path; New article event, specification updated with it; Currency dropped from the plan tag; Articles labelled blog in page views; Monthly billers' annual value sent as one month. Their patches, the checks, the thresholds and the study's predictions for them were already committed and did not change, and adding them changed no earlier release's score.
- Double clicks. After a double click the second request aborts the first navigation, but the visitor still arrives. Read as a stopped visitor, that visitor would have been dropped from the lost double-submit guard's truth, losing demo requests and inflating its left-alone count, so an aborted navigation that still arrives counts as arriving, and that release was run with this rule. No other build sends two requests.
- Thinned paths. On the four releases that change behaviour, landed visitors are drawn from among the kept visitors, one draw per visitor. Drawn separately, they open a gap between truth and hits that no tag caused, and one harmless headline change reads as metric-breaking. Browser runs did not change. This rule favours one of the study's predictions, as it says above.
- The worked example, chosen after the results as the plainest case of a right data layer and a lost hit.
- The money paragraph, on costs copied from the first round and a range set after the results.
- Readings added after the results: what the rule for a find assumes (a later fix, no dashboard reader), the floor, exact intervals (kept in the results file, not on this page), the money range and the locked form's value. These were written down in a short file before the code that computes them, and they change no number above.
- Readings added after the results: each declared setting's days to a find, with and without the dashboard reader, and the locked form's pipeline against margin. The prediction that the full check stops a smaller share on the author's releases counts as held on the point estimate only, with no interval, since the releases are not a sample. These readings were declared before their code, and they change no earlier number. The tests of the full check also carry planted faults for the three assertions that would otherwise have had none.
- Readings added after the results: at a third of the traffic, the runs in which monitoring's automated checks left 2 of the author's breaks unfound, 16 of 20. That count was declared before its code and changes no earlier number.
README with the reproduction stepsComplete resultsThe checks (Python)DesignFrameworkThe first round