README
f-trak
Analytics module that provides a consistent interface for reporting analytics.
f-trak :bear:
Setup
Add f-trak to your project:
yarn add @justeat/f-trak
Then, inside your script import the module such that:
import Trak from '@justeat/f-trak';
Usage
Event Throttling
Throttles events by a given timeout (in seconds) using the event action as a key.
For example
<!-- Set event throttling to 1 minute -->
<button
data-trak='{
"trakEvent": "click",
"category": "My test category",
"action": "My test action",
"label": "My test label"
"throttle": 60
}'
>
My Test Button
</button>