1.1.6 • Published 6 years ago

vue-xiti-smarttag v1.1.6

Weekly downloads
65
License
MIT
Repository
github
Last release
6 years ago

vue-xiti-smarttag

Vue plugin for xiti's smarttag javascript library

NPM

npm install --save vue-xiti-smarttag

In the main.js

import Vue from 'vue'
import VueXitiSmarttagPlugin from 'vue-xiti-smarttag' 

Vue.use(VueXitiSmarttagPlugin, {id: 'XXXXXX'/*at internet site id*/})

In a component

   <template>
       <h1>hello world</h1>
       <button @click="sendSomething"></button>
   </template>
   
   <script>
     export default {
       name: 'hello',
       created() {
         // this is the Page hit
         this.$xitiSendPage({ name: 'sample_page', customObject: { crazyID: '454353frg45' } }); //xiti object
       },
       methods: {
         sendSomething() {
           // this is the Click hit
           this.$xitiSendClick({elem: this, name: 'clickName', level2: 'clickLvl2', type: 'navigation'});
         },
       },
     };
   </script>

CDN

In this case the plugin is auto-installed

<head>  
    <script src="https://unpkg.com/vue/dist/vue.min.js"></script>
    <script src="https://unpkg.com/vue-xiti-smarttag/dist/vue-xiti-smarttag.min.js"></script>
</head>
<body>
    <div id="app">
        <my-component></mycomponent>
    </div>

    <script>
        new Vue({  el: '#app' })
    </script>
</body>
1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.0.1

6 years ago