Repository navigation
v12 - #40
v12#40
Conversation
It seems Solana from Phantom has this namespace for their browser extension. I added a check for prevent them being detected as bots.
Fix problem with solana extension
…ith-jsdom-and-mocha Add unit tests using jsdom
Save local changes v12-b
…le [no ci] Add AGENTS instructions
…trategy-with-abstractions Add modular tests and helper utilities
Documentation update
|
The merge from main renamed the custom destination to caddy, so the header test matched no custom files and typecheck failed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Runs auto-events.js on a same-tab outbound link and checks that it binds a click listener instead of an onclick attribute, leaves the click alone, and asks sa_event for keepalive. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
sendEvent already uses a noop for a missing callback, so 0 is enough to reach the keepalive argument. Saves 11 bytes minified, 1 gzip. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Other scripts can replace navigator.sendBeacon with a wrapper that throws "Illegal invocation" (#42). Without the fallback no time on page arrives, the remaining pings stop and every hide throws an error. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Cloudflare challenges run on the site itself, so a challenge marker in a referrer from another non-unique hostname no longer makes the first pageview unique. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The challenge page replaced the original referrer, so the pageview only sent our own hostname. The queue turns pageviews with our own hostname as referrer non-unique, which undid the unique arrival. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Documentation update
|
The cleaned referrer has no www. and can carry an overwritten hostname, so www sites kept sending their own hostname as referrer (which the queue turns non-unique) and sites with a matching non-unique hostname sent unique=false. Check the raw referrer first, before sameSite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The cleaned referrer has no www. and uses the defined hostname, so on www sites and sites with data-hostname internal page loads and manual pageviews were sent as unique, and SPA pageviews and events on data-hostname sites lost their referrer. Compare the raw referrer host with the location host, and treat later pageviews as same-site. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Appends from data-pings now include ping: true, so the backend can block them for plans without pings. Appends sent on hide or navigation are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
| @@ -73,20 +75,9 @@ | |||
| if (typeof optionsLink === "undefined") | |||
| log("options object not found, please specify", "warn"); | |||
|
|
|||
| window.saAutomatedLink = function saAutomatedLink(element, type) { | |||
| var saAutomatedLink = function saAutomatedLink(element, type) { | |||
There was a problem hiding this comment.
Why this change? Shouldn't it be on window anymore?
| } | ||
| } catch (error) { | ||
| log(error.message, "warn"); | ||
| } | ||
| }; | ||
|
|
||
| function collectLink(link, onclick) { | ||
| window.saAutomatedLink = saAutomatedLink; |
There was a problem hiding this comment.
This is basically double then, no?
| link.addEventListener("click", function () { | ||
| saAutomatedLink(this, collect); | ||
| }); |
There was a problem hiding this comment.
Wouldn't it make sense to keep the saAutomatedLink function just internally only? Why expose to window?
| // Only initialize in a browser. | ||
| if (!window) return; |
There was a problem hiding this comment.
Why is there no /** if skipnonwindow **/ because it was there before, no?
Summary
Fixes #97
Prepare public script v12:
Before merging, update beta.js as well or inform customer team 13489e0b-295c-476b-b955-46389fe10895.
Security implications
Has security impact - described as: - [ ] No security impact - [x] Has security impact - described as: - Query parameter values are never collected by this addition. - Name collection is limited to parameters with non-empty values and can be disabled.
Testing
Checklist
Summary by CodeRabbit
Open workspace in Conductor