@ichnos/vue
@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' }))
Related Packages
duplicate-dependencies-webpack-plugin
webpack plugin to find duplicated dependencies from your bundle
332,104
6
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.0.2 | ^2.6.8 | ISC | |
| 1.0.1 | ^2.6.8 | ISC | |
| 1.0.0 | ^2.6.8 | ISC | |
| 0.0.14 | ISC | ||
| 0.0.13 | ISC | ||
| 0.0.10 | ISC |
Pre-releases (3)
| Version | Released | License |
|---|---|---|
| 0.0.10-alpha.0 | ISC | |
| 0.0.9-alpha.0 | ISC | |
| 0.0.8-alpha.0 | ISC |