Repository navigation
Preserve existing script installations when releasing v12 #107
Copy link
Copy link
Open
Description
What
Preserve existing installations when releasing script v12 in #40:
- Count distinct manual pageviews while preserving pathname-only path-overwriter input, ignored pages, and hash routes.
- Use an explicitly supplied manual query with existing parameter filtering. When no manual query is supplied, fall back to
location.search. PreserveoverwriteSearch. - Keep namespaced pageview functions separate from the default tracker, retaining the free legacy alias.
- Collect phone events while leaving cancelled clicks and navigation to the website and browser.
- Count Cloudflare challenge arrivals as unique as requested in Pageviews should be unique when Cloudflare's under attack mode is on #48, using the owner's chosen simple marker check (
?__cf_or&__cf_). Keep existing reload/history and later-pageview handling; omit the explicitly declined same-URL guard. - Ensure current generated bundles pass deployment validation while older pinned headers remain supported.
Why
Existing embeds should retain their pageview counts, explicit query overrides, website routing, and click behavior when the public scripts update.
Merge status
Merge the remaining PRs into v12 before releasing #40 to main:
- Count Cloudflare challenge arrivals as unique #112: Cloudflare arrival correction and the requested simple marker check. Includes latest
v12at58f6679, source, regression tests, and matching distributions. This also preserves the modified-click fix from Fix cmd-click for auto events #78. - Accept current and legacy script deployment headers #117: accept current and legacy deployment headers, test the current SRI manifest automatically, and run the lightweight deployment tests in CI. Visitor-facing scripts are unchanged by this PR.
Already merged into v12:
- Preserve distinct manual pageviews in v12 #108: distinct manual pageviews, pathname-only callbacks, ignored pages, hash routes, and numeric paths.
- Respect the configured namespace for manual pageviews #110: namespaced manual pageviews and the compatible legacy alias.
- Leave phone click navigation to the website and browser #111: phone collection without programmatic telephone navigation.
Superseded or closed:
- Preserve browser query attribution for manual pageviews #109 is closed because removing manual-query overrides contradicts the explicitly chosen behavior above. It must not be merged.
- Make the existing v12 unit tests runnable from a clean checkout #113 is closed because the jsdom dependency, runnable unit command, and CI unit step are already present in
v12. - Rebuild v12 bundles after merged compatibility fixes #116 is closed. The applicable source PR now includes its matching generated artifacts; a separate distribution-only follow-up is unnecessary.
Validation
- Count Cloudflare challenge arrivals as unique #112: 53 offline unit tests and 36 payload checks pass across development, minified CDN, and SRI bundles, including the requested manual-query override/browser-fallback contract. Changed JavaScript formatting and diff checks pass.
- Accept current and legacy script deployment headers #117: all 15 deployment tests and type checking pass. The header regression checks the current version discovered in
dist, current generated headers, legacy headers, and malformed headers. - Combined compatibility and deployment changes were also verified locally with the unit suite, deployment suite, type checking, and payload checks.
- Remote CI and automated review results are tracked on each PR separately from local validation. BrowserStack is not run locally.
Keep shipped JavaScript small, preserve older pinned versions, retain case-insensitive parameter matching, and keep the querykeys opt-out. Build outputs belong with their source changes. Both remaining PRs request adriaandotcom for review.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
Preserve ignore-pages and hash routes for manual query paths
Keep reviewed manual-path guards with browser query attribution
Merge reviewed manual-path corrections into the attribution branch
Retain the free legacy manual pageview alias
Keep non-string manual paths compatible during query normalization
Keep numeric manual paths compatible in the attribution stack
Merge final manual-path compatibility guard into attribution branch
Preserve distinct manual pageviews in v12 (#108)
Leave phone click navigation to the website and browser (#111)
Rebuild v12 bundles from the merged compatibility fixes
Respect the configured namespace for manual pageviews (#110)
Merge current v12 and resolve Cloudflare compatibility artifacts
Accept current and legacy script deployment headers
Merge latest v12 and simplify the Cloudflare marker check
Check headers for the current SRI version in deployment tests
Keep the simple Cloudflare check working after campaign parameters
Count Cloudflare challenge arrivals as unique (#112)
Accept current and legacy script deployment headers (#117)
simple-analytics-ai commentedon Oct 15, 2026
Checked unresolved review threads on #40 and #108–#113 against the current v12 head
6b84d4251ea29a2d0744c615223fa3108649e081, prioritizing CodeRabbit. The earlier fix PRs have no unresolved threads.CodeRabbit: verified fixes ready for review
metadata.phone. The fix preserves the title-derived event name and includes the same phone metadata as an untitled link, without the query suffix. A failing regression now passes; 54 offline unit tests pass. Auto-events: +14 minified bytes / +9 gzip bytes, excluding generated headers. Main/light scripts are unchanged.dist/latest/latest.js. Reproduced the false pass before and the mismatch failure after; all 15 deployment tests and type checking pass.Both PRs independently target v12, are ready for review, and request adriaandotcom. Merge them before #40; no order dependency between them. Original CodeRabbit threads link to the fixes and stay open until their changes land in v12. BrowserStack is not run locally; remote CI is tracked separately.
Other open comments
Already handled or deliberately accepted:
querykeysdisables the names. Referrer/source suppression also suppresses names through the shared source flag.?__cf_/&__cf_marker behavior.document.location, including phones. The earlier unwanted-navigation comment is fixed in the current source.Still reproducible, outside this focused CodeRabbit fix pass:
/repeatproduce one request and one callback. A new caller that depends on every callback to continue its flow can hang. The current callback only runs for requests actually sent, so changing this needs an explicit callback-contract decision.<label for="yearly">inside adata-simple-event="plan_toggle"wrapper produces two events, from the label and its forwarded input click. This affects the new inline feature; existing installations that do not use these attributes are unaffected. Avoid a generic timer-based deduplication that could drop independent clicks.0in place of the placeholder callback is compatible with the current sendEvent argument handling. Optional byte optimization, not a customer-facing defect; kept out of the phone metadata PR.CodeRabbit's general scope/docstring/title suggestions are review housekeeping, not demonstrated customer breakages. The release intentionally spans the accepted v12 changes; bulk docstring additions are not needed for these two fixes.
fix: retain phone metadata with titled events (#122)
test: require current script version in SRI header checks (#123)