A tiny utility for working with analytics events
on the server and in the browser.
Getting Started
Installation
Install with npm:
npm install --save analytics-event
Or with yarn:
yarn add analytics-event
Examples
// Generate event from options // Use your favorite analytics library to send eventsanalytics
Usage
Generating an event
// Generate an event that follows https://schema.org/AnalyticsEvent
Formatting an event
// You can also just import the format function with:// import { format, loadFormat } from 'analytics-event' AEvent { return batch}
Contributing
All contributions are super welcome! analytics-event
is MIT-licensed.