0.0.16 • Published 8 months ago
tinfoil v0.0.16
Tinfoil Analytics Client
A privacy-preserving web analytics solution using the Distributed Aggregation Protocol (DAP). Collects anonymous metrics while ensuring user privacy through secure aggregation.
Quick Start
Add the script tag to your HTML:
<script async src="https://js.tinfoil.sh" data-param="your.domain.com"></script>
For custom event tracking, add the tinfoil-event-name
class:
<button class="tinfoil-event-name=Button+Click">Click Me</button>
Development
To run the project locally, use the following commands:
# Install dependencies
npm install
# Build the project
npm run build
# Run unit tests
npm run test
# Run end-to-end tests
npm run test:e2e
Publishing
- Bump the version in
package.json
:
"version": "0.0.XX"
- Build the package:
npm run build
- Publish the package:
npm publish
- Go to the jsdelivr repo and follow the README there to update the hosted version at js.tinfoil.sh.