Releases: ostr-io/ostrio-analytics
Releases · ostr-io/ostrio-analytics
Release list
v2.0.1
Summary: Hardens tracking-ID validation, error-handler teardown, and transport fallbacks. Adds the agent skill and export/type tests.
Changes
- 🔧 tracking ID must be 17 alphanumeric chars (
A–Z,a–z,0–9) - 🔧 error reports use the same URL scrubbing as pageviews
- 🔧 cap cached global errors at 256; clear on
destroy() - 🔧 restore chained
window.onerrorwhen trackers are destroyed out of order - 🔧 skip reports from destroyed error handlers
- 🔧 same-origin check for error source URLs (no query-string spoof)
- 🔧 beacon fallback when
sendBeaconis missing or returns false - 🔧 CJS/ESM/UMD exports and types aligned
- 🔧 rollup
--forceExit; drop source maps from the npm tarball - 🧪 export and TypeScript consumer tests; CI runs build + exports + types
- 🚛 Moved to
ostr-ioorg - ☝️ LICENSE year
✨ New
- Agent skill:
npx skills add ostr-io/ostrio-analytics -g --skill ostrio-analytics - analytics comparison doc
📦 Dependencies (Development):
- tslib (UMD downlevel helpers)
v2.0.0
Brief: Ground-up TypeScript rewrite with multi-format builds, smarter URL filtering, hardened transports, and stronger runtime validation.
New methods
setTransport(Transport)— switch betweenfetch,beacon, andimgat runtime (auto-fallback toimgiffetchis unavailable).applySettings({...})— update runtime flags (trackHash,trackQuery,transport,serviceUrl) without reinstantiating.ignoreQuery(key)/ignoreQueries(keys[])— case-insensitive removal of noisy query/search params from navigation detection and payloads.destroy()— unbind all listeners and clear internal timers (SPA teardown/HMR friendly).
Major changes
- TypeScript port with strict types and generated declarations.
- Smarter URL controls:
trackHash,trackQuery,ignoredQueries,ignoredPaths(supports exact, prefix/*, andRegExp). Internals now useSetfor performance and dedupe. - Transport hardening: default
fetchwithcredentials: 'include',mode: 'no-cors',cache: 'no-store';beaconwhen available; legacyimgpixel fallback. - Global error capture: adds
unhandledrejectionreporting and de-dupes identical[Global Error]payloads. - Validation: constructing with an invalid 17-char tracking ID now throws an error.
- Service URL normalization: trailing slash enforced.
- Distribution artifacts: ESM (
dist/index.js), CJS (dist/index.cjs), UMD (dist/ostrio-analytics.umd.js), UMD minified (dist/ostrio-analytics.min.js), and types (dist/index.d.ts). - Package exports map aligned for modern bundlers; UMD/minified builds only attach the global
window.OstrioTrackerClassfor<script>usage (modules do not pollute globals).
Breaking changes
- Invalid tracking ID throws at construction.
- Global attach limited to script builds: ESM/CJS no longer define globals.
Full Changelog: 1.3.0...2.0.0
v1.3.0
- Deprecated DNT
- Opt out for end users
- Deprecate Beacon Protocol (as blocked by most of the browsers)
v1.2.1
- 📦 NPM: v1.2.1
- ☄️ Meteor: v1.3.1
New:
- 📡 Add support for Beacon API
- 📋 Docs: Google Analytics integration
- 📋 Docs: Google Tag Manager integration
- 📋 Docs: Mention support of Beacon API
Changed:
- 👨💻 Codebase: Minor overall optimizations
- 📋 Docs: Overall fixes and enhancements
v1.2.0 (Meteor: v1.3.0)
- 👨💻 Added
.onPushEvent()method - 👨💻 Added
.onTrack()method - 👷♂️ Improved Global Errors reporting
- 📋 Documentation improvement
v1.1.9 (Meteor: v1.2.9)
- 👨💻 Remove
clicklistener on anchor elements, it's not necessary in 2019 and should slightly reduce JS footprint of the library - 📋 Documentations update
v1.1.8 (Meteor: v1.2.8)
- 📦 Internal Meteor dependencies update
- 🤝 Compatibility with
meteor@1.8.1 - 👷♂️ Maintenance release
v1.1.7 (Meteor: v1.2.7)
- 🔥 Hot fixes over codebase, update is highly recommended
- 📦 [Meteor ☄️] Internal dependencies update
- 🤝 [Meteor ☄️] Compatibility with
meteor@1.8.0.2 - 📄 License year bump
v1.1.6 (Meteor: v1.2.6)
- 🔥 Hot fix over latest release
v1.1.5 (Meteor: v1.2.5)
- 📄 Docs update
- 👨💻 Minor code refactoring
- 👷♂️ Encode "Custom Event" data