Vue plugin built on keen-tracking.js.
import VueKeen from "vue-keen-tracking"; const keenOptions = { projectId: "<KEEN_PROJECT_ID>", writeKey: "<KEEN_WRITE_KEY>" }; Vue.use(VueKeen, keenOptions); You can then access the KeenTracking object through this.$keen in any of your components/views.
const user = await fetchUser(); this.$keen.extendEvents({ user }) this.$keen.recordEvent("purchases", { item: "avocado" });