scripts icon indicating copy to clipboard operation
scripts copied to clipboard

Open Source Public Scripts for Simple Analytics

Results 8 scripts issues
Sort by recently updated
recently updated
newest added

Add this for iOS: https://github.com/duckduckgo/iOS/blob/28f2c58201a6b74abba12fc3ace057d76322b135/Core/UserAgentManager.swift#L99-L103 And this for desktop: ```js window.navigator._duckduckgoloader_ ```

- [x] Fix invalid bot detection with `window.phantom.solana` - [x] Expose `sa_pageview` function always, to use with `ignore-pages` - [ ] https://github.com/simpleanalytics/scripts/issues/41 - [ ] Check for Cloudflare under attack...

From a very helpful customer, we got this error report: > The following is logged to console: > Simple Analytics: Uncaught TypeError: Illegal invocation > At this stage, it seems...

For some customers it only is added to 30% of the page views: ![2024-04-07-22h16-screenshot@2x](https://github.com/simpleanalytics/scripts/assets/1079135/e064a746-3a9a-4e81-ad64-b53e343cbdba)

We can check this with `?__cf_chl_tk=...` in the referrer URL.

sendOnLeave throws a TypeError: Illegal invocation on line 554: ```javascript nav.sendBeacon(fullApiUrl + "/append", stringify(append)); ``` This is the relevant part of the code: ```javascript if (push || !nav.sendBeacon) { //...

Would be nice with instructions on how to install this via NPM, to avoid having to make an HTTP request to pull the file for every page load (i.e. `/latest.js`)....

**Steps to reproduce** Go to https://www.simpleanalytics.com/ and scroll to the footer Try opening the “Documentation” link in a new tab (CMD or SHIFT?) **What did you expect** Because it is...