Comparing version 0.1.4 to 0.1.5
/*! | ||
* vue-piwik v0.1.4 | ||
* vue-piwik v0.1.5 | ||
* (c) 2018 Dennis Ruhe | ||
@@ -52,4 +52,8 @@ * Released under the MIT License. | ||
if (options.router) { | ||
options.router.afterEach(function (from, to) { | ||
piwik.trackPageView(); | ||
options.router.afterEach(function (to, from) { | ||
var loc = window.location; | ||
var url = loc.protocol + '://' + loc.host + to.path; | ||
piwik.setCustomUrl(url); | ||
piwik.trackPageView(to.name); | ||
}); | ||
@@ -56,0 +60,0 @@ } |
/*! | ||
* vue-piwik v0.1.4 | ||
* vue-piwik v0.1.5 | ||
* (c) 2018 Dennis Ruhe | ||
@@ -48,4 +48,8 @@ * Released under the MIT License. | ||
if (options.router) { | ||
options.router.afterEach(function (from, to) { | ||
piwik.trackPageView(); | ||
options.router.afterEach(function (to, from) { | ||
var loc = window.location; | ||
var url = loc.protocol + '://' + loc.host + to.path; | ||
piwik.setCustomUrl(url); | ||
piwik.trackPageView(to.name); | ||
}); | ||
@@ -52,0 +56,0 @@ } |
/*! | ||
* vue-piwik v0.1.4 | ||
* vue-piwik v0.1.5 | ||
* (c) 2018 Dennis Ruhe | ||
@@ -54,4 +54,8 @@ * Released under the MIT License. | ||
if (options.router) { | ||
options.router.afterEach(function (from, to) { | ||
piwik.trackPageView(); | ||
options.router.afterEach(function (to, from) { | ||
var loc = window.location; | ||
var url = loc.protocol + '://' + loc.host + to.path; | ||
piwik.setCustomUrl(url); | ||
piwik.trackPageView(to.name); | ||
}); | ||
@@ -58,0 +62,0 @@ } |
/*! | ||
* vue-piwik v0.1.4 | ||
* vue-piwik v0.1.5 | ||
* (c) 2018 Dennis Ruhe | ||
@@ -7,2 +7,2 @@ * Released under the MIT License. | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.VuePiwik=e.VuePiwik||{})}(this,function(e){"use strict";e.default=function(i,n){var e,r,t;void 0===n&&(n={}),(e=n,r=e.host+"/piwik.js",t=new Promise(function(e,t){var o=document.createElement("script");o.async=!0,o.defer=!0,o.src=r,(document.head||document.getElementsByTagName("head")[0]).appendChild(o),o.onload=e,o.onerror=t}),t.catch(function(e){console.error("Error loading script",e)}),t).then(function(){var e=n.host,t=n.siteId,o=window.Piwik.getTracker(e+"/piwik.php",t);(i.prototype.$piwik=o).trackPageView(),n.router&&n.router.afterEach(function(e,t){o.trackPageView()})})},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.VuePiwik=e.VuePiwik||{})}(this,function(e){"use strict";e.default=function(o,i){var e,n,t;void 0===i&&(i={}),(e=i,n=e.host+"/piwik.js",t=new Promise(function(e,t){var o=document.createElement("script");o.async=!0,o.defer=!0,o.src=n,(document.head||document.getElementsByTagName("head")[0]).appendChild(o),o.onload=e,o.onerror=t}),t.catch(function(e){console.error("Error loading script",e)}),t).then(function(){var e=i.host,t=i.siteId,n=window.Piwik.getTracker(e+"/piwik.php",t);(o.prototype.$piwik=n).trackPageView(),i.router&&i.router.afterEach(function(e,t){var o=window.location,i=o.protocol+"://"+o.host+e.path;n.setCustomUrl(i),n.trackPageView(e.name)})})},Object.defineProperty(e,"__esModule",{value:!0})}); |
{ | ||
"name": "vue-piwik", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Link your Piwik/Matomo installation", | ||
@@ -5,0 +5,0 @@ "author": "Dennis Ruhe <dennis@amazingsystems.nl>", |
@@ -46,24 +46,8 @@ # VuePiwik | ||
<!-- Local files --> | ||
<link rel="stylesheet" href="vue-piwik/dist/vue-piwik.css"></link> | ||
<script src="vue-piwik/dist/vue-piwik.js"></script> | ||
<!-- From CDN --> | ||
<link rel="stylesheet" href="https://unpkg.com/vue-piwik/dist/vue-piwik.css"></link> | ||
<script src="https://unpkg.com/vue-piwik"></script> | ||
``` | ||
## Development | ||
### Launch visual tests | ||
```bash | ||
npm run dev | ||
``` | ||
### Launch Karma with coverage | ||
```bash | ||
npm run dev:coverage | ||
``` | ||
### Build | ||
@@ -77,20 +61,4 @@ | ||
## Publishing | ||
The `prepublish` hook will ensure dist files are created before publishing. This | ||
way you don't need to commit them in your repository. | ||
```bash | ||
# Bump the version first | ||
# It'll also commit it and create a tag | ||
npm version | ||
# Push the bumped package and tags | ||
git push --follow-tags | ||
# Ship it 🚀 | ||
npm publish | ||
``` | ||
## License | ||
[MIT](http://opensource.org/licenses/MIT) |
@@ -17,4 +17,8 @@ import bootstrap from './bootstrap' | ||
if (options.router) { | ||
options.router.afterEach((from, to) => { | ||
piwik.trackPageView() | ||
options.router.afterEach((to, from) => { | ||
const loc = window.location | ||
const url = loc.protocol + '://' + loc.host + to.path | ||
piwik.setCustomUrl(url) | ||
piwik.trackPageView(to.name) | ||
}) | ||
@@ -21,0 +25,0 @@ } |
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
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
13594
191
63