vue event report component
- make sure node and npm installed;
> npm install vue-event-report
import vue from 'vue';
import vue_event_report from 'vue-event-report';
// install
vue.use(vue_event_report);
// set report handler
vue_event_report.setReportHandler(({ event, data }) => {
if (event == 'click') {
// click event
} else if (event == 'exposure') {
// exposure event
}
})
<template>
<div>
<div v-report="{ key: value }">
</div>
<div v-report:click="{ key: value }">
</div>
<div v-report:exposure="{ key: value }">
</div>
</div>
</template>
- make sure node and npm installed;
- clone the repo to local;
- run
npm install
to install node modules; - run
npm run build
to get an unminified build file atlib
folder;