Events¶
You use the kontrl.event function whenever something happens that needs to be tracked. We will save that for 1 month. And when you want to, you can display the events on the dashboard.
Events are pushed to Kontrl every 10 minutes
Kontrl.event()¶
You throw events with kontrl.event(..).
Params:
- name The name of the event. Max 20 characters. Events with the same name are grouped.
- value The value the event currently has. Can be a string or object.
Examples¶
Track route visits
const kontrl = require("kontrl");
kontrl.event({
name: "route_visit",
value: "/about"
});
Track your sales
const kontrl = require("kontrl");
kontrl.event({
name: "sale",
value: {
"digimon_the_movie": 1,
"yugioh_pack": 3
}
});