@prestashopcorp/segment-vue
Advanced tools
Comparing version 2.1.6 to 2.1.7
/*! | ||
* @prestashopcorp/segment-vue v2.1.5 | ||
* @prestashopcorp/segment-vue v2.1.7 | ||
* (c) 2021 undefined | ||
@@ -39,3 +39,3 @@ * Released under the MIT License. | ||
// A list of the methods in Analytics.js to stub. | ||
analytics.methods = ["trackSubmit", "trackClick", "trackLink", "trackForm", "pageview", "identify", "reset", "group", "track", "ready", "alias", "debug", "page", "once", "off", "on"]; | ||
analytics.methods = ["trackSubmit", "trackClick", "trackLink", "trackForm", "pageview", "identify", "reset", "group", "track", "ready", "alias", "debug", "page", "once", "off", "on", "addSourceMiddleware", "addIntegrationMiddleware", "setAnonymousId", "addDestinationMiddleware"]; | ||
@@ -62,3 +62,3 @@ // Define a factory to create stubs. These are placeholders | ||
// Add a version to keep track of what's in the wild. | ||
analytics.SNIPPET_VERSION = "4.13.1"; | ||
analytics.SNIPPET_VERSION = "4.13.2"; | ||
@@ -65,0 +65,0 @@ // For each of our methods, generate a queueing stub. |
{ | ||
"name": "@prestashopcorp/segment-vue", | ||
"version": "2.1.6", | ||
"version": "2.1.7", | ||
"description": "plugin vue for segment", | ||
@@ -5,0 +5,0 @@ "main": "dist/@prestashopcorp/segment-vue.js", |
@@ -11,3 +11,3 @@ # vue-segment | ||
Vue ^2.0.0 | ||
Vue ^2.x or Vue ^3.x | ||
@@ -17,4 +17,5 @@ ```bash | ||
``` | ||
### Vue 2 | ||
```js | ||
```js | ||
import Vue from 'vue' | ||
@@ -28,5 +29,19 @@ import SegmentVue from '@prestashopcorp/segment-vue' | ||
### Vue 3 | ||
```js | ||
import { createApp } from "vue"; | ||
import SegmentVue from '@prestashopcorp/segment-vue' | ||
const app = createApp(App) | ||
app.use(SegmentVue, { | ||
id: 'XXXXX', | ||
}); | ||
``` | ||
## Identify | ||
add this on your App.vue file | ||
add this on your layout file | ||
```js | ||
@@ -42,2 +57,3 @@ created(){ | ||
## Track | ||
@@ -63,2 +79,3 @@ | ||
### Vue 2 | ||
```js | ||
@@ -77,2 +94,16 @@ export default { | ||
### Vue 3 | ||
```js | ||
export default { | ||
path: "dashboard", | ||
name: "dashboard", //Set name on each route | ||
component: DashboardApp, | ||
}; | ||
app.use(SegmentVue, { | ||
id: 'XXXXX', | ||
router | ||
}); | ||
``` | ||
### exclude route option | ||
@@ -98,2 +129,3 @@ | ||
### Vue 2 | ||
```js | ||
@@ -107,1 +139,10 @@ Vue.use(SegmentVue, { | ||
### Vue 3 | ||
```js | ||
app.use(SegmentVue, { | ||
id: 'XXXXX', | ||
router, | ||
pageCategory: "ps_metrics_" | ||
}); | ||
``` | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
141
11062
4
172
2