BeatlesAnswers.org Under construction

Fixing an analytics event that never fired and nine broken schema blocks

By · Build log; logged

The site’s only custom analytics event had never fired, because it listened for a search form that exists on no page. The same review found nine broken structured-data blocks where Search Console had reported two. Both are fixed, and the replacement event sends no personal data.

Nine broken blocks, not two

A pass through the project’s outstanding-actions register found four open items for this site, covering traffic, indexing, content and measurement. Search Console had sampled two pages with malformed structured data, and following that up found nine. All nine had the same fault: a Frequently Asked Questions block whose answer quoted a song title in straight double quotes, which ends a JSON string early and makes the block invalid. Nine song pages had been serving FAQ data that no crawler could read. An escaping pass across all 1,162 JSON-LD blocks on the site fixed the nine, and every block now parses.

An event bound to nothing

The measurement item turned up the larger problem. The site’s one custom GA4 event, search, was meant to record internal searches and listened for a form matching form.header-search. That selector exists on no page. Site search has always used a Google Programmable Search element rather than a native form, and the listener had been copied forward from an older template. Two hundred and eighty-three pages carried working JavaScript that could never run. That is one possible reason, among several, why the analytics property has reported no key events despite real traffic.

The dead listener was removed everywhere. A single event, research_engagement, replaces it. It fires at most once per page view, when a reader scrolls to the Recording, Mix Variants or Sources section or after forty-five seconds of active time, whichever comes first. Internal search is still measured, but only as a band of query length (“1–10 characters”, “11–20” and so on), never the words typed. No identifier, name or free text leaves the browser, and the privacy policy was rewritten in the same session to say so, so a reader can check the claim.

When the audit script was wrong

An early pass flagged two song pages as poorly linked, with only two and three inbound links. The auditing script was at fault: a filter meant to skip phone links rejected anything beginning with tel, which is how Tell Me Why and Tell Me What You See both begin. With the filter fixed, inbound links range from four to seventy-two across all 215 song pages. The one real gap was Yes It Is, which had never been added to the songs index after it was written from scratch. A script that audits the site can be wrong too, so its findings are checked before they change a page.

A homepage served with an old stylesheet

The homepage gained two generated link panels, for the latest articles and build-log posts, built from the headline and datePublished in each post’s structured data. A new script, gen_hero.py, writes them into the homepage as plain HTML, and its --check flag fails if they fall out of date. The first deploy still looked broken: the new grid relied on a stylesheet that had been edited without changing its ?v= cache token, so returning visitors were served the old file. Comparing the stylesheet the live site served with the edited one found the cause. The token now changes with every CSS edit as a standing rule.

Enrichment through Help!

Enrichment continued at two pages per session through the second half of the Help! sessions. One page written from scratch records a genuine disagreement between the two primary sources over the name of a guitar pedal, and gives both readings rather than choosing one. Enrichment stands at 92 of 214 songs and metadata tagging at 39, and the re-verification streak is unbroken at twenty-five. A new essay on single and album mix variants was published in Articles, and its comparison table became a shared CSS component.

None of the measurement or schema work changed a documented fact. Two items in the register still need Search Console and GA4 access that this project does not have.