vue-mixpanel-browser
v0.0.6
Published
A vue plugin for mixpanel-browser
Downloads
352
Maintainers
Readme
vue-mixpanel-browser
A vue plugin for Mixpanel Browser
Installation
yarn add vue-mixpanel-browser
From you main file.
import Vue from 'vue';
import VueMixpanelBrowser from 'vue-mixpanel-browser';
Vue.use(VueMixpanelBrowser, {
token: YOUR_TOKEN,
config: {...}
});
Usage
From your vue components you can now access Mixpanel Browser via $mixpanel
this.$mixpanel.track('sign up');
Passing mixpanel options
Available config for mixpanel can be found here;
import Vue from 'vue';
import VueMixpanelBrowser from 'vue-mixpanel-browser';
import { MixpanelPluginOptions } from 'vue-mixpanel-browser';
const options: MixpanelPluginOptions = {
token: YOUR_TOKEN,
config: {...} // Mixpanel config
Vue.use(VueMixpanelBrowser, options);