Socket
Socket
Sign inDemoInstall

vue-matomo

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-matomo - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

2

dist/vue-matomo.js

@@ -1,1 +0,1 @@

!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var t=r();for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}("undefined"!=typeof self?self:this,function(){return function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var t={};return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=0)}([function(e,r,t){"use strict";function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=Object.assign({},i,r),n=t.host,c=t.siteId,u=t.trackerFileName;e.prototype.$piwik=a,e.prototype.$matomo=a,a.setTrackerUrl(n+"/"+u+".php"),a.setSiteId(c),t.requireConsent&&a.requireConsent(),t.trackInitialView&&a.trackPageView(),t.enableLinkTracking&&a.enableLinkTracking(),t.router&&t.router.afterEach(function(e,r){a.trackPageView()}),o(t)}Object.defineProperty(r,"__esModule",{value:!0});var o=function(e){var r=e.host,t=e.trackerFileName,n=r+"/"+t+".js",o=new Promise(function(e,r){var t=document.createElement("script");t.async=!0,t.defer=!0,t.src=n,(document.head||document.getElementsByTagName("head")[0]).appendChild(t),t.onload=e,t.onerror=r});return o.catch(function(e){var r="[vue-matomo] An error occurred trying to load "+e.target.src+". If the file exists you may have an ad- or trackingblocker enabled.";console.error(r)}),o},a=new Proxy({},{get:function(e,r,t){return window._paq=window._paq||[],function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=[r].concat(t);console.debug(o),window._paq.push(o)}}});r.default=n;var i={enableLinkTracking:!0,requireConsent:!1,trackInitialView:!0,trackerFileName:"piwik"}}])});
!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{var t=r();for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}("undefined"!=typeof self?self:this,function(){return function(e){function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}var t={};return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=0)}([function(e,r,t){"use strict";function o(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=Object.assign({},i,r),o=t.host,c=t.siteId,u=t.trackerFileName;e.prototype.$piwik=a,e.prototype.$matomo=a,a.setTrackerUrl(o+"/"+u+".php"),a.setSiteId(c),t.requireConsent&&a.requireConsent(),t.trackInitialView&&a.trackPageView(),t.enableLinkTracking&&a.enableLinkTracking(),t.router&&t.router.afterEach(function(e,r){var o=window.location,n=o.protocol;":"!==n.slice(-1)&&(n+=":"),console.log(t.router);var i="hash"===t.router.mode?"/#":"",c=n+"//"+o.host+i+e.path;a.setCustomUrl(c),a.trackPageView()}),n(t)}Object.defineProperty(r,"__esModule",{value:!0});var n=function(e){var r=e.host,t=e.trackerFileName,o=r+"/"+t+".js",n=new Promise(function(e,r){var t=document.createElement("script");t.async=!0,t.defer=!0,t.src=o,(document.head||document.getElementsByTagName("head")[0]).appendChild(t),t.onload=e,t.onerror=r});return n.catch(function(e){var r="[vue-matomo] An error occurred trying to load "+e.target.src+". If the file exists you may have an ad- or trackingblocker enabled.";console.error(r)}),n},a=new Proxy({},{get:function(e,r,t){return window._paq=window._paq||[],function(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];var n=[r].concat(t);console.debug(n),window._paq.push(n)}}});r.default=o;var i={enableLinkTracking:!0,requireConsent:!1,trackInitialView:!0,trackerFileName:"piwik"}}])});
{
"name": "vue-matomo",
"version": "0.5.0",
"version": "0.5.1",
"description": "Link your Piwik/Matomo installation",

@@ -5,0 +5,0 @@ "author": "Dennis Ruhe <dennis@amazingsystems.nl>",

@@ -39,2 +39,18 @@ import bootstrap from './bootstrap'

options.router.afterEach((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
const loc = window.location
// Protocol may or may not contain a colon
let protocol = loc.protocol
if (protocol.slice(-1) !== ':') {
protocol += ':'
}
console.log(options.router)
const maybeHash = options.router.mode === 'hash' ? '/#' : ''
const url = protocol + '//' + loc.host + maybeHash + to.path
Matomo.setCustomUrl(url)
Matomo.trackPageView()

@@ -41,0 +57,0 @@ })

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc