Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Add 'packages/tracker-js/' from commit 'b88167b13b2da9092aa68eb5e866a3b46997f90d'

Blue Mouseb1d1360bf028
diff --cc packages/tracker-js/.github/funding.yml
index 000000000,000000000..f7cbd9642
new file mode 100644
--- /dev/null
+++ b/packages/tracker-js/.github/funding.yml
@@@ -1,0 -1,0 +1,2 @@@
++github: swetrix
++ko_fi: andriir
diff --cc packages/tracker-js/.github/workflows/test.yml
index 000000000,ad25ffc85..ad25ffc85
mode 000000,100644..100644
--- a/packages/tracker-js/.github/workflows/test.yml
+++ b/packages/tracker-js/.github/workflows/test.yml
diff --cc packages/tracker-js/.gitignore
index 000000000,000000000..c6bd1d7a7
new file mode 100644
--- /dev/null
+++ b/packages/tracker-js/.gitignore
@@@ -1,0 -1,0 +1,108 @@@
++# Logs
++logs
++*.log
++npm-debug.log*
++yarn-debug.log*
++yarn-error.log*
++lerna-debug.log*
++
++# Diagnostic reports (https://nodejs.org/api/report.html)
++report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
++
++# Runtime data
++pids
++*.pid
++*.seed
++*.pid.lock
++
++# Directory for instrumented libs generated by jscoverage/JSCover
++lib-cov
++
++# Coverage directory used by tools like istanbul
++coverage
++*.lcov
++
++# nyc test coverage
++.nyc_output
++
++# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
++.grunt
++
++# Bower dependency directory (https://bower.io/)
++bower_components
++
++# node-waf configuration
++.lock-wscript
++
++# Compiled binary addons (https://nodejs.org/api/addons.html)
++build/Release
++
++# Dependency directories
++node_modules/
++jspm_packages/
++
++# TypeScript v1 declaration files
++typings/
++
++# TypeScript cache
++*.tsbuildinfo
++
++# Optional npm cache directory
++.npm
++
++# Optional eslint cache
++.eslintcache
++
++# Microbundle cache
++.rpt2_cache/
++.rts2_cache_cjs/
++.rts2_cache_es/
++.rts2_cache_umd/
++
++# Optional REPL history
++.node_repl_history
++
++# Output of 'npm pack'
++*.tgz
++
++# Yarn Integrity file
++.yarn-integrity
++
++# dotenv environment variables file
++.env
++.env.test
++
++# parcel-bundler cache (https://parceljs.org/)
++.cache
++
++# Next.js build output
++.next
++
++# Nuxt.js build / generate output
++.nuxt
++# dist
++
++# Gatsby files
++.cache/
++# Comment in the public line in if your project uses Gatsby and *not* Next.js
++# https://nextjs.org/blog/next-9-1#public-directory-support
++# public
++
++# vuepress build output
++.vuepress/dist
++
++# Serverless directories
++.serverless/
++
++# FuseBox cache
++.fusebox/
++
++# DynamoDB Local files
++.dynamodb/
++
++# TernJS port file
++.tern-port
++
++.DS_Store
++pnpm-lock.yaml
++yarn.lock
diff --cc packages/tracker-js/.prettierrc.cjs
index 000000000,f4360c220..f4360c220
mode 000000,100644..100644
--- a/packages/tracker-js/.prettierrc.cjs
+++ b/packages/tracker-js/.prettierrc.cjs
diff --cc packages/tracker-js/LICENSE
index 000000000,000000000..f94fee6fa
new file mode 100644
--- /dev/null
+++ b/packages/tracker-js/LICENSE
@@@ -1,0 -1,0 +1,21 @@@
++MIT License
++
++Copyright (c) 2021 Andrii Romasiun
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to deal
++in the Software without restriction, including without limitation the rights
++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in all
++copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++SOFTWARE.
diff --cc packages/tracker-js/README.md
index 000000000,000000000..366151b0a
new file mode 100644
--- /dev/null
+++ b/packages/tracker-js/README.md
@@@ -1,0 -1,0 +1,26 @@@
++<picture>
++ <source media="(prefers-color-scheme: dark)" srcset="https://swetrix.com/assets/logo_white.png">
++ <img alt="" src="https://swetrix.com/assets/logo_blue.png" height="80">
++</picture>
++<br /><br />
++
++[![JSDelivr hits](https://data.jsdelivr.com/v1/package/gh/Swetrix/swetrix-js/badge?style=rounded)](https://data.jsdelivr.com/v1/package/gh/Swetrix/swetrix-js/stats)
++[![Package size](https://img.shields.io/bundlephobia/minzip/swetrix)](https://bundlephobia.com/api/size?package=swetrix)
++[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/swetrix/swetrix-js/issues)
++
++# Swetrix Tracking Script
++
++This repository contains the analytics script which is used at https://swetrix.com \
++You can find the detailed documentation and use cases at our [docs page](https://docs.swetrix.com/).
++
++Feel free to contribute to the source code by opening a pull requests. \
++For any questions, you can open an issue ticket, refer to our [FAQs](https://swetrix.com/#faq) page or reach us at [email protected]
++
++The latest live versions of the script are located at [jsDelivr](https://swetrix.org/swetrix.js) and [NPM](https://www.npmjs.com/package/swetrix).
++
++# Selfhosted API
++If you are selfhosting the [Swetrix-API](https://github.com/Swetrix/swetrix-api), be sure to point the `apiUrl` parameter to: `https://yourapiinstance.com/log`
++
++# Donate
++You can support the project by donating us at https://ko-fi.com/andriir \
++We can only run our services by once again asking for your financial support!
diff --cc packages/tracker-js/dist/esnext/Lib.d.ts
index 000000000,e6fa46403..e6fa46403
mode 000000,100644..100644
--- a/packages/tracker-js/dist/esnext/Lib.d.ts
+++ b/packages/tracker-js/dist/esnext/Lib.d.ts
diff --cc packages/tracker-js/dist/esnext/Lib.js
index 000000000,ad369bf56..ad369bf56
mode 000000,100644..100644
--- a/packages/tracker-js/dist/esnext/Lib.js
+++ b/packages/tracker-js/dist/esnext/Lib.js
diff --cc packages/tracker-js/dist/esnext/Lib.js.map
index 000000000,798c67fe7..798c67fe7
mode 000000,100644..100644
--- a/packages/tracker-js/dist/esnext/Lib.js.map
+++ b/packages/tracker-js/dist/esnext/Lib.js.map
diff --cc packages/tracker-js/dist/esnext/index.d.ts
index 000000000,c3915a4cc..c3915a4cc
mode 000000,100644..100644
--- a/packages/tracker-js/dist/esnext/index.d.ts
+++ b/packages/tracker-js/dist/esnext/index.d.ts
diff --cc packages/tracker-js/dist/esnext/index.js
index 000000000,8a2d9f101..8a2d9f101
mode 000000,100644..100644
--- a/packages/tracker-js/dist/esnext/index.js
+++ b/packages/tracker-js/dist/esnext/index.js
diff --cc packages/tracker-js/dist/esnext/index.js.map
index 000000000,491921db2..491921db2
mode 000000,100644..100644
--- a/packages/tracker-js/dist/esnext/index.js.map
+++ b/packages/tracker-js/dist/esnext/index.js.map
diff --cc packages/tracker-js/dist/esnext/utils.d.ts
index 000000000,3290e575e..3290e575e
mode 000000,100644..100644
--- a/packages/tracker-js/dist/esnext/utils.d.ts
+++ b/packages/tracker-js/dist/esnext/utils.d.ts
diff --cc packages/tracker-js/dist/esnext/utils.js
index 000000000,f7e634acd..f7e634acd
mode 000000,100644..100644
--- a/packages/tracker-js/dist/esnext/utils.js
+++ b/packages/tracker-js/dist/esnext/utils.js
diff --cc packages/tracker-js/dist/esnext/utils.js.map
index 000000000,d02d2c927..d02d2c927
mode 000000,100644..100644
--- a/packages/tracker-js/dist/esnext/utils.js.map
+++ b/packages/tracker-js/dist/esnext/utils.js.map
diff --cc packages/tracker-js/dist/swetrix.cjs.js
index 000000000,9e00f9dfa..9e00f9dfa
mode 000000,100644..100644
--- a/packages/tracker-js/dist/swetrix.cjs.js
+++ b/packages/tracker-js/dist/swetrix.cjs.js
diff --cc packages/tracker-js/dist/swetrix.cjs.js.map
index 000000000,a54b1434b..a54b1434b
mode 000000,100644..100644
--- a/packages/tracker-js/dist/swetrix.cjs.js.map
+++ b/packages/tracker-js/dist/swetrix.cjs.js.map
diff --cc packages/tracker-js/dist/swetrix.es5.js
index 000000000,a76c945a2..a76c945a2
mode 000000,100644..100644
--- a/packages/tracker-js/dist/swetrix.es5.js
+++ b/packages/tracker-js/dist/swetrix.es5.js
diff --cc packages/tracker-js/dist/swetrix.es5.js.map
index 000000000,ba3831e52..ba3831e52
mode 000000,100644..100644
--- a/packages/tracker-js/dist/swetrix.es5.js.map
+++ b/packages/tracker-js/dist/swetrix.es5.js.map
diff --cc packages/tracker-js/dist/swetrix.js
index 000000000,3953f1548..3953f1548
mode 000000,100644..100644
--- a/packages/tracker-js/dist/swetrix.js
+++ b/packages/tracker-js/dist/swetrix.js
diff --cc packages/tracker-js/dist/swetrix.js.map
index 000000000,d529a5db4..d529a5db4
mode 000000,100644..100644
--- a/packages/tracker-js/dist/swetrix.js.map
+++ b/packages/tracker-js/dist/swetrix.js.map
diff --cc packages/tracker-js/jest.config.js
index 000000000,5114a815b..5114a815b
mode 000000,100644..100644
--- a/packages/tracker-js/jest.config.js
+++ b/packages/tracker-js/jest.config.js
diff --cc packages/tracker-js/package-lock.json
index 000000000,f02e0a76b..f02e0a76b
mode 000000,100644..100644
--- a/packages/tracker-js/package-lock.json
+++ b/packages/tracker-js/package-lock.json
diff --cc packages/tracker-js/package.json
index 000000000,12914435f..12914435f
mode 000000,100644..100644
--- a/packages/tracker-js/package.json
+++ b/packages/tracker-js/package.json
diff --cc packages/tracker-js/rollup.config.mjs
index 000000000,59090f8d3..59090f8d3
mode 000000,100644..100644
--- a/packages/tracker-js/rollup.config.mjs
+++ b/packages/tracker-js/rollup.config.mjs
diff --cc packages/tracker-js/src/Lib.ts
index 000000000,db6fd649b..db6fd649b
mode 000000,100644..100644
--- a/packages/tracker-js/src/Lib.ts
+++ b/packages/tracker-js/src/Lib.ts
diff --cc packages/tracker-js/src/index.ts
index 000000000,1b5c1958c..1b5c1958c
mode 000000,100644..100644
--- a/packages/tracker-js/src/index.ts
+++ b/packages/tracker-js/src/index.ts
diff --cc packages/tracker-js/src/utils.ts
index 000000000,4202daf16..4202daf16
mode 000000,100644..100644
--- a/packages/tracker-js/src/utils.ts
+++ b/packages/tracker-js/src/utils.ts
diff --cc packages/tracker-js/tests/README.md
index 000000000,1fc0e5078..1fc0e5078
mode 000000,100644..100644
--- a/packages/tracker-js/tests/README.md
+++ b/packages/tracker-js/tests/README.md
diff --cc packages/tracker-js/tests/errors.test.ts
index 000000000,1f0e0b1c2..1f0e0b1c2
mode 000000,100644..100644
--- a/packages/tracker-js/tests/errors.test.ts
+++ b/packages/tracker-js/tests/errors.test.ts
diff --cc packages/tracker-js/tests/events.test.ts
index 000000000,9192d108b..9192d108b
mode 000000,100644..100644
--- a/packages/tracker-js/tests/events.test.ts
+++ b/packages/tracker-js/tests/events.test.ts
diff --cc packages/tracker-js/tests/experiments.test.ts
index 000000000,f2d278e99..f2d278e99
mode 000000,100644..100644
--- a/packages/tracker-js/tests/experiments.test.ts
+++ b/packages/tracker-js/tests/experiments.test.ts
diff --cc packages/tracker-js/tests/initialisation.test.ts
index 000000000,d87b4e262..d87b4e262
mode 000000,100644..100644
--- a/packages/tracker-js/tests/initialisation.test.ts
+++ b/packages/tracker-js/tests/initialisation.test.ts
diff --cc packages/tracker-js/tests/pageview.test.ts
index 000000000,68d05d1fb..68d05d1fb
mode 000000,100644..100644
--- a/packages/tracker-js/tests/pageview.test.ts
+++ b/packages/tracker-js/tests/pageview.test.ts
diff --cc packages/tracker-js/tests/utils.test.ts
index 000000000,2698aae0c..2698aae0c
mode 000000,100644..100644
--- a/packages/tracker-js/tests/utils.test.ts
+++ b/packages/tracker-js/tests/utils.test.ts
diff --cc packages/tracker-js/tsconfig.esnext.json
index 000000000,de1bca9a9..de1bca9a9
mode 000000,100644..100644
--- a/packages/tracker-js/tsconfig.esnext.json
+++ b/packages/tracker-js/tsconfig.esnext.json
diff --cc packages/tracker-js/tsconfig.json
index 000000000,a7e21f182..a7e21f182
mode 000000,100644..100644
--- a/packages/tracker-js/tsconfig.json
+++ b/packages/tracker-js/tsconfig.json