Skip to content

MP3 without import maps again; events to measure the helper and hand-offs - #20

Merged
formeo merged 1 commit into
mainfrom
compat-metrics
Oct 22, 2026
Merged

formeo merged 1 commit into
mainfrom
compat-metrics

Conversation

@formeo

@formeo formeo commented Oct 22, 2026

Copy link
Copy Markdown
Owner

1. Compatibility fix (regression from #15)

After lamejs was replaced by Mediabunny, the encoders were loaded through an import map. Safari supports import maps only from 16.4, so on older iPhones (and browsers of that age) no tool could save MP3, and the converter failed on every format.

  • The encoder bundles now import ./mediabunny.min.mjs, and media.js imports the library by path. No page needs an import map, and all are removed.
  • vendor/mediabunny/README.md documents the one rewrite and how to repeat it on update (a sed line).
  • The floor is now what Mediabunny's own code needs (e.g. ??=, Safari 14+). I could not test old Safari here. In Chromium, every page now runs without an import map, and the full conversion suites pass (including the no-WebCodecs fallback).

2. Events to evaluate the helper and hand-offs

No file names, file contents or typed text are sent.

Event Params Question it answers
file_processed tool, via = assistant / next / direct Does the helper (or "continue with this file") lead to a processed file?
assistant_pick tool, method, rank, with_settings Is the first suggestion the right one?
assistant_nomatch method How often does the helper not understand? (once per visit, after typing settles)
settings_kept tool, kept = yes/no Were the helper's settings left as they were when the file was processed?

via is set when a tool page picks up a hand-off (sessionStorage, per page path), and read by toolSuccess.

The privacy policy now lists these events and states that helper input is never sent. Changelog updated.

Also

scripts/build_zh.py runs seo_sync.py at the end; before, a build without a manual sync left the Chinese FAQ JSON-LD in English.

Checks (headless Chromium)

  • metrics_e2e: direct → via: direct; helper + "speed up 1.5x" → via: assistant, settings_kept: yes; helper + "louder by 6 dB", then gain changed → settings_kept: no; pick → rank: 1, with_settings: yes; two unmatched requests → one assistant_nomatch without text; "continue with this file" → via: next.
  • Converter UI matrix (normal + no WebCodecs), batch, MP3/WAV exports, Chinese pages, GA4 events on all tools, helper hand-offs and settings, links/hreflang, contrast: all OK.

After merge (GA4)

Admin → Custom definitions → Create custom dimension (event scope): tool, via, method, rank, with_settings, kept. Admin → Events → mark file_processed and donate_click as key events.


Generated by Claude Code

…offs

Compatibility (regression from #15):
- The encoder bundles import "./mediabunny.min.mjs" and media.js imports the
  library by path, so no import map is needed. Browsers without import-map
  support (Safari < 16.4) could not save MP3 anywhere after lamejs was
  removed; the floor is now what Mediabunny itself needs. Import maps removed
  from all pages; vendor README documents the one rewrite.

Measurement (no file names, contents or typed text):
- file_processed gets via: assistant | next | direct (hand-off marks the tool
  page in sessionStorage).
- assistant_pick gets rank and with_settings.
- assistant_nomatch: once per visit when the helper can't match a request.
- settings_kept: whether settings put in by the helper were unchanged when the
  file was processed.
- Privacy policy lists these events; changelog.

Also: build_zh.py runs seo_sync.py at the end, so Chinese FAQ JSON-LD can't be
left in English.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016rsS6JgzjZXLy17J1cgACN
@formeo
formeo merged commit ede8227 into main Oct 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants