vue-matomo
Advanced tools
Comparing version 0.1.7 to 0.1.8
/*! | ||
* vue-matomo v0.1.7 | ||
* vue-matomo v0.1.8 | ||
* (c) 2018 Dennis Ruhe | ||
@@ -61,4 +61,11 @@ * Released under the MIT License. | ||
var loc = window.location; | ||
var url = loc.protocol + '://' + loc.host + to.path; | ||
// Protocol may or may not contain a colon | ||
var protocol = loc.protocol; | ||
if (protocol.slice(-1) !== ':') { | ||
protocol += ':'; | ||
} | ||
var url = protocol + '//' + loc.host + to.path; | ||
matomo.setCustomUrl(url); | ||
@@ -65,0 +72,0 @@ matomo.trackPageView(to.name); |
/*! | ||
* vue-matomo v0.1.7 | ||
* vue-matomo v0.1.8 | ||
* (c) 2018 Dennis Ruhe | ||
@@ -57,4 +57,11 @@ * Released under the MIT License. | ||
var loc = window.location; | ||
var url = loc.protocol + '://' + loc.host + to.path; | ||
// Protocol may or may not contain a colon | ||
var protocol = loc.protocol; | ||
if (protocol.slice(-1) !== ':') { | ||
protocol += ':'; | ||
} | ||
var url = protocol + '//' + loc.host + to.path; | ||
matomo.setCustomUrl(url); | ||
@@ -61,0 +68,0 @@ matomo.trackPageView(to.name); |
/*! | ||
* vue-matomo v0.1.7 | ||
* vue-matomo v0.1.8 | ||
* (c) 2018 Dennis Ruhe | ||
@@ -63,4 +63,11 @@ * Released under the MIT License. | ||
var loc = window.location; | ||
var url = loc.protocol + '://' + loc.host + to.path; | ||
// Protocol may or may not contain a colon | ||
var protocol = loc.protocol; | ||
if (protocol.slice(-1) !== ':') { | ||
protocol += ':'; | ||
} | ||
var url = protocol + '//' + loc.host + to.path; | ||
matomo.setCustomUrl(url); | ||
@@ -67,0 +74,0 @@ matomo.trackPageView(to.name); |
/*! | ||
* vue-matomo v0.1.7 | ||
* vue-matomo v0.1.8 | ||
* (c) 2018 Dennis Ruhe | ||
@@ -7,2 +7,2 @@ * Released under the MIT License. | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o(e.VueMatomo=e.VueMatomo||{})}(this,function(e){"use strict";e.default=function(t,n){var e,r,o;void 0===n&&(n={}),(e=n,r=e.host+"/piwik.js",o=new Promise(function(e,o){var t=document.createElement("script");t.async=!0,t.defer=!0,t.src=r,(document.head||document.getElementsByTagName("head")[0]).appendChild(t),t.onload=e,t.onerror=o}),o.catch(function(e){console.error("Error loading script",e)}),o).then(function(){var e=n.host,o=n.siteId,r=window.Piwik.getTracker(e+"/piwik.php",o);t.prototype.$piwik=r,t.prototype.$matomo=r,n.requireConsent&&r.requireConsent(),r.trackPageView(),n.router&&n.router.afterEach(function(e,o){var t=window.location,n=t.protocol+"://"+t.host+e.path;r.setCustomUrl(n),r.trackPageView(e.name)})})},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports):"function"==typeof define&&define.amd?define(["exports"],o):o(e.VueMatomo=e.VueMatomo||{})}(this,function(e){"use strict";e.default=function(t,n){var e,r,o;void 0===n&&(n={}),(e=n,r=e.host+"/piwik.js",o=new Promise(function(e,o){var t=document.createElement("script");t.async=!0,t.defer=!0,t.src=r,(document.head||document.getElementsByTagName("head")[0]).appendChild(t),t.onload=e,t.onerror=o}),o.catch(function(e){console.error("Error loading script",e)}),o).then(function(){var e=n.host,o=n.siteId,i=window.Piwik.getTracker(e+"/piwik.php",o);t.prototype.$piwik=i,t.prototype.$matomo=i,n.requireConsent&&i.requireConsent(),i.trackPageView(),n.router&&n.router.afterEach(function(e,o){var t=window.location,n=t.protocol;":"!==n.slice(-1)&&(n+=":");var r=n+"//"+t.host+e.path;i.setCustomUrl(r),i.trackPageView(e.name)})})},Object.defineProperty(e,"__esModule",{value:!0})}); |
/*! | ||
* vue-piwik v0.1.5 | ||
* vue-piwik v0.1.6 | ||
* (c) 2018 Dennis Ruhe | ||
@@ -47,2 +47,6 @@ * Released under the MIT License. | ||
if (options.requireConsent) { | ||
piwik.requireConsent(); | ||
} | ||
// Register first page view | ||
@@ -54,2 +58,4 @@ piwik.trackPageView(); | ||
options.router.afterEach(function (to, from) { | ||
// Unfortunately the window location is not yet updated here | ||
// We need to make our own ulr using the data provided by the router | ||
var loc = window.location; | ||
@@ -56,0 +62,0 @@ var url = loc.protocol + '://' + loc.host + to.path; |
/*! | ||
* vue-piwik v0.1.5 | ||
* vue-piwik v0.1.6 | ||
* (c) 2018 Dennis Ruhe | ||
@@ -43,2 +43,6 @@ * Released under the MIT License. | ||
if (options.requireConsent) { | ||
piwik.requireConsent(); | ||
} | ||
// Register first page view | ||
@@ -50,2 +54,4 @@ piwik.trackPageView(); | ||
options.router.afterEach(function (to, from) { | ||
// Unfortunately the window location is not yet updated here | ||
// We need to make our own ulr using the data provided by the router | ||
var loc = window.location; | ||
@@ -52,0 +58,0 @@ var url = loc.protocol + '://' + loc.host + to.path; |
/*! | ||
* vue-piwik v0.1.5 | ||
* vue-piwik v0.1.6 | ||
* (c) 2018 Dennis Ruhe | ||
@@ -49,2 +49,6 @@ * Released under the MIT License. | ||
if (options.requireConsent) { | ||
piwik.requireConsent(); | ||
} | ||
// Register first page view | ||
@@ -56,2 +60,4 @@ piwik.trackPageView(); | ||
options.router.afterEach(function (to, from) { | ||
// Unfortunately the window location is not yet updated here | ||
// We need to make our own ulr using the data provided by the router | ||
var loc = window.location; | ||
@@ -58,0 +64,0 @@ var url = loc.protocol + '://' + loc.host + to.path; |
/*! | ||
* vue-piwik v0.1.5 | ||
* vue-piwik v0.1.6 | ||
* (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(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})}); | ||
!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,n){var e,i,t;void 0===n&&(n={}),(e=n,i=e.host+"/piwik.js",t=new Promise(function(e,t){var o=document.createElement("script");o.async=!0,o.defer=!0,o.src=i,(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,i=window.Piwik.getTracker(e+"/piwik.php",t);o.prototype.$piwik=i,n.requireConsent&&i.requireConsent(),i.trackPageView(),n.router&&n.router.afterEach(function(e,t){var o=window.location,n=o.protocol+"://"+o.host+e.path;i.setCustomUrl(n),i.trackPageView(e.name)})})},Object.defineProperty(e,"__esModule",{value:!0})}); |
{ | ||
"name": "vue-matomo", | ||
"version": "0.1.7", | ||
"version": "0.1.8", | ||
"description": "Link your Piwik/Matomo installation", | ||
@@ -5,0 +5,0 @@ "author": "Dennis Ruhe <dennis@amazingsystems.nl>", |
@@ -1,2 +0,2 @@ | ||
# VuePiwik | ||
# VueMatomo | ||
@@ -7,3 +7,3 @@ [![npm](https://img.shields.io/npm/v/vue-matomo.svg)](https://www.npmjs.com/package/vue-matomo) | ||
> Link your Piwik/Matomo installation | ||
Link your Piwik/Matomo installation | ||
@@ -10,0 +10,0 @@ ## Installation |
@@ -26,4 +26,11 @@ import bootstrap from './bootstrap' | ||
const loc = window.location | ||
const url = loc.protocol + '://' + loc.host + to.path | ||
// Protocol may or may not contain a colon | ||
let protocol = loc.protocol | ||
if (protocol.slice(-1) !== ':') { | ||
protocol += ':' | ||
} | ||
const url = protocol + '//' + loc.host + to.path | ||
matomo.setCustomUrl(url) | ||
@@ -30,0 +37,0 @@ matomo.trackPageView(to.name) |
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
22018
402