@ichnos/vue
Vue plugin for ichnos
Last updated 6 months ago by tmohamed1 .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @ichnos/vue 
SYNC missed versions from official npm registry.

@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' }))

Current Tags

  • 1.0.2                                ...           latest (6 months ago)

9 Versions

  • 1.0.2                                ...           6 months ago
  • 1.0.1                                ...           9 months ago
  • 1.0.0                                ...           9 months ago
  • 0.0.14                                ...           10 months ago
  • 0.0.13                                ...           10 months ago
  • 0.0.10                                ...           10 months ago
  • 0.0.10-alpha.0                                ...           10 months ago
  • 0.0.9-alpha.0                                ...           10 months ago
  • 0.0.8-alpha.0                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 9
Last Day 9
Last Week 9
Last Month 27
Dependencies (5)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |