vue-multianalytics
Advanced tools
Comparing version
{ | ||
"name": "vue-multianalytics", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "A vue multianalytics tool", | ||
@@ -5,0 +5,0 @@ "main": "./dist/vue-multianalytics.min.js", |
@@ -20,2 +20,3 @@ | ||
- [Facebook Pixel](#facebook-pixel) | ||
- [Segment](#segment) | ||
- [Todo](#todo) | ||
@@ -56,4 +57,2 @@ | ||
mixpanel: mixpanelConfig | ||
}, | ||
params: { | ||
} | ||
@@ -105,6 +104,7 @@ }) | ||
}, | ||
params: { | ||
routing: { | ||
vueRouter: router, // Pass the router instance to automatically sync with router (optional) | ||
preferredProperty: 'name', // By default 'path' and related with vueRouter (optional) | ||
ingoredViews: ['homepage'] | ||
ingoredViews: ['homepage'], // Views that will not be tracked | ||
ignoredModules: ['ga'] // Modules that will not send route change events. The event sent will be this.$ma.trackView({viewName: 'homepage'}, ['ga']) | ||
} | ||
@@ -238,3 +238,67 @@ }) | ||
### setAlias(alias) | ||
```javascript | ||
/** | ||
* Set an alias | ||
* | ||
* @param alias | ||
*/ | ||
this.$ma.setAlias('user1234@test.com') | ||
``` | ||
### setUsername(name) | ||
```javascript | ||
/** | ||
* Set a username | ||
* | ||
* @param name | ||
*/ | ||
this.$ma.setUsername('user1234@test.com') | ||
``` | ||
### setUserProperties(properties) | ||
```javascript | ||
/** | ||
* Set some user properties | ||
* | ||
* @param properties | ||
*/ | ||
this.$ma.setUserProperties({userId: '12345', name: 'John'}) | ||
``` | ||
### setUserPropertiesOnce(properties) | ||
```javascript | ||
/** | ||
* Set some user properties, but only once | ||
* | ||
* @param properties | ||
*/ | ||
this.$ma.setUserPropertiesOnce({userId: '12345', name: 'John'}) | ||
``` | ||
### setSuperProperties(properties) | ||
```javascript | ||
/** | ||
* Set some properties to be sent in every event | ||
* | ||
* @param properties | ||
*/ | ||
this.$ma.setSuperProperties({platform: 'Mobile'}) | ||
``` | ||
### setSuperPropertiesOnce(properties) | ||
```javascript | ||
/** | ||
* Set some properties to be sent in every event | ||
* | ||
* @param properties | ||
*/ | ||
this.$ma.setSuperPropertiesOnce({platform: 'Mobile'}) | ||
``` | ||
## Modules | ||
@@ -254,3 +318,3 @@ | ||
``` | ||
Supported Events: `trackView`, `trackEvent`, `trackException`, `trackTiming` | ||
Supported Events: `trackView`, `trackEvent`, `trackException`, `setUsername`, `trackTiming` | ||
@@ -263,5 +327,6 @@ ### Mixpanel | ||
tracker: 'YOUR_TRACKER' | ||
config: {} // Initial mixpanel config | ||
debug: true // Whether or not display console logs debugs (optional) | ||
``` | ||
Supported Events: `trackView`, `trackEvent` | ||
Supported Events: `trackView`, `trackEvent`, `setAlias`, `setUsername`, `setUserProperties`, `setSuperPropertiesOnce`, `setSuperProperties`, `setSuperPropertiesOnce` | ||
@@ -277,2 +342,11 @@ ### Facebook Pixel | ||
### Segment | ||
Name: `segment` | ||
Config: | ||
```javascript | ||
token: 'YOUR_TOKEN' | ||
debug: true // Whether or not display console logs debugs (optional) | ||
``` | ||
Supported Events: `trackView`, `trackEvent`, `setAlias`, `setUserProperties`, `setSuperProperties` | ||
## Todo | ||
@@ -279,0 +353,0 @@ - ~~Demo~~ 👍 |
339901
0.49%351
26.71%