GithubHelp home page GithubHelp logo

vue-sensors's Introduction

vue-sensors

Introduction

API

  • v-sa-click record click times, trigger track event when tag click.
// track data will not change
v-sa-click="['event_name', {arg1: 1}]"

// track data will update when origin data change
v-sa-click:sync="['event_name', {arg1: 1}]"
  • v-sa-duration recod the duration of the tag living, trigger track event before tag destory.
// arguments the same as v-sa-click
v-sa-duration="['event_name', {arg1: 1}]"
v-sa-duration:sync="['event_name', {arg1: 1}]"

Usage

  • index.html
<div id="app">
  <input class="btn" type="button" value="发送" v-sa-click="['test_v_sensors', {arg1: 1}]">
</div>
  • index.js
import vueSensors from 'vue-sensors'

const config = {
  name: 'sa',
  web_url: 'https://test.sensorsdata.com/sa?project=test_sensors',
  server_url: 'https://test.sensorsdata.com/sa?project=test_sensors',
  heatmap: {},
  show_log: true,
}
Vue.use(vueSensors, config)

new Vue({
  el: '#app',
  mounted() {
    console.log('mounted')
    this.$sa.login('xxx ')
  }
})

vue-sensors's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

addieo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.