Repository navigation
Remove retired Cloudflare app plumbing from v12 - #121
Merged
Merged
Conversation
Requested: open a PR into v12 removing Cloudflare app options while keeping GTM settings and a working client-side guard. Preserve sa_settings and data-attribute behavior, guard browser access, and rebuild current tracker artifacts.
Documentation update
|
Claude review checkpointReviewed commit |
|
SDLC label: |
adriaandotcom
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #120
Requested: remove the retired Cloudflare app integration from v12 while keeping Google Tag Manager configuration and an effective client-side guard.
Remove the Cloudflare build target,
INSTALL_OPTIONSinjection,overwriteOptionsargument and placeholders, latest Cloudflare artifact, and obsolete README link. Preserve settings precedence, script-attribute fallbacks, and the newly merged Cloudflare challenge attribution behavior. Rebuild the current tracker distributions; published v1-v11 and automatic-event artifacts remain unchanged.The old optional window check ran after browser-property access, and its function call evaluated a bare
window. The replacement safely passes the browser window and returns before any browser access in every tracker build.Security implications
Testing
pnpm run buildpassed with Node 24.18.0 / pnpm 11.17.0.pnpm run test:unit: 53 passing.73efbbb0e3cfbe50b44b28b99df0d2ee86cc7283) across development, minified, SRI, and custom-domain trackers. Covered GTM defaults, hostname precedence, parameters, ignored pages/metrics, hash mode, DNT, metadata, custom domains, and direct JavaScript settings/callbacks. Payloads and settings matched after normalizing generated IDs/timestamps.window; custom-domain SSI placeholders were rendered before evaluation.git diff --checkpassed. ESLint reports the same three existing v12 errors (no-emptytwice andno-redeclareonce).Evidence
Before: GTM used the merged Cloudflare options object; tracker evaluation without
windowthrew a ReferenceError.After: GTM produces matching requests through local settings; all 15 trackers safely skip non-browser execution. The build no longer creates
cloudflare.js.Same-build code size excluding generated headers:
latest.js+14 minified bytes / +2 gzip;light.js+1 / +1. The small increase enables the browser guard for every tracker.Merge Danger
Door: two-way; revert the commit to restore the old build.
Blast Radius: tracker. Browser configuration and payload behavior are preserved; the retired Cloudflare app build is deliberately removed.
Checklist