Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-mouseflow

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-mouseflow

Vue.js plugin to add Mouseflow tracking to your application

  • 1.1.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
40
decreased by-72.22%
Maintainers
1
Weekly downloads
 
Created
Source

VueMouseflow

npm prettier

📈 Vue.js plugin for Mouseflow tracking

Installation

npm install --save vue-mouseflow

Plugin Installation

VueMouseflow.install(Vue, options)
  • Vue<Object>: a Vue instance
  • tracking_key<String>: The Mouseflow tracking key you want to use

Install the plugin using the Vue.use method:

import Vue from 'vue';
import VueMouseflow from 'vue-mouseflow';

Vue.use(VueMouseflow, { tracking_key: 'your-tracking-key' });

Methods

Push

VueMouseflow.push([commandName, argument1, argument2, …]);

This acts as a wrapper for the _mfq object. Check https://js-api-docs.mouseflow.com/#the-_mfq-object for more information.

Router Hook

VueMouseflow.logRouteChange(route[, options])
  • route<Object>: a VueRouter route object
  • options<Object>:
    • includeRouteParams<Boolean>: Set to false to remove all user-entered URL params. Useful if there is sensitive data in the URL which you do not want to track. Defaults to true.
// router.js
import VueRouter from 'vue-router';
import VueMouseflow from 'vue-mouseflow';

const router = new VueRouter({
  routes: [
    /* some routes */
  ]
});

router.afterEach(to => {
  VueMouseflow.logRouteChange(to, { includeRouteParams: false });
});

this.$mf

VueMouseflow is also added to your Vue prototype when installed. The above two methods are exposed on the this.$mf namespace.

This can be useful for event logging within components:

const MyApp = new Vue({
  ...,
  methods: {
    buttonPressed(evt) {
      this.$mf.push('addedToCart', Date.now());
    }
  }
})

Keywords

FAQs

Package last updated on 11 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc