1.0.2 • Published 5 years ago
@ichnos/vue v1.0.2
@ichnos/vue
Vue plugin for ichnos
Install
npm install @ichnos/vue
Setup Vue plugin
import { plugin } from '@ichnos/vue'
import Vue from 'vue'
Vue.use(plugin, {
events: [{ type: 'addToCart' }],
options: {
id: 'GTM-XXXX',
active: true
},
beforeSend: event => ({
event: 'my_app_events',
...event
})
})
then, ichnos instance will be available via \$ichnos in vue instance.
next, you can either fire events imperatively using send
method or use ichnos as vue-directive
Using directive
Below example to fire focusin
event
<button v-ichnos:click.addToCart="{ category: 'xyz' }" />
Fire events Imperatively
in any vue component you will access to $ichnos
instance to fire any event using send
method.
const { send, events } = this.$ichnos
send(events.addToCart({ category: 'xyz' }))
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.0.14
5 years ago
0.0.13
5 years ago
0.0.10
5 years ago
0.0.10-alpha.0
5 years ago
0.0.9-alpha.0
5 years ago
0.0.8-alpha.0
5 years ago