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.1.8 to 0.1.9

17

dist/vue-matomo.common.js
/*!
* vue-matomo v0.1.8
* vue-matomo v0.1.9
* (c) 2018 Dennis Ruhe

@@ -35,5 +35,12 @@ * Released under the MIT License.

function install (Vue, options) {
if ( options === void 0 ) options = {};
var defaultOptions = {
requireConsent: false,
trackInitialView: true
};
function install (Vue, setupOptions) {
if ( setupOptions === void 0 ) setupOptions = {};
var options = Object.assign({}, defaultOptions, setupOptions);
bootstrap(options)

@@ -54,3 +61,5 @@ .then(function () {

// Register first page view
matomo.trackPageView();
if (options.trackInitialView) {
matomo.trackPageView();
}

@@ -57,0 +66,0 @@ // Track page navigations if router is specified

/*!
* vue-matomo v0.1.8
* vue-matomo v0.1.9
* (c) 2018 Dennis Ruhe

@@ -31,5 +31,12 @@ * Released under the MIT License.

function install (Vue, options) {
if ( options === void 0 ) options = {};
var defaultOptions = {
requireConsent: false,
trackInitialView: true
};
function install (Vue, setupOptions) {
if ( setupOptions === void 0 ) setupOptions = {};
var options = Object.assign({}, defaultOptions, setupOptions);
bootstrap(options)

@@ -50,3 +57,5 @@ .then(function () {

// Register first page view
matomo.trackPageView();
if (options.trackInitialView) {
matomo.trackPageView();
}

@@ -53,0 +62,0 @@ // Track page navigations if router is specified

/*!
* vue-matomo v0.1.8
* vue-matomo v0.1.9
* (c) 2018 Dennis Ruhe

@@ -37,5 +37,12 @@ * Released under the MIT License.

function install (Vue, options) {
if ( options === void 0 ) options = {};
var defaultOptions = {
requireConsent: false,
trackInitialView: true
};
function install (Vue, setupOptions) {
if ( setupOptions === void 0 ) setupOptions = {};
var options = Object.assign({}, defaultOptions, setupOptions);
bootstrap(options)

@@ -56,3 +63,5 @@ .then(function () {

// Register first page view
matomo.trackPageView();
if (options.trackInitialView) {
matomo.trackPageView();
}

@@ -59,0 +68,0 @@ // Track page navigations if router is specified

/*!
* vue-matomo v0.1.8
* vue-matomo v0.1.9
* (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,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})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.VueMatomo=e.VueMatomo||{})}(this,function(e){"use strict";var i={requireConsent:!1,trackInitialView:!0};e.default=function(o,e){void 0===e&&(e={});var t,n,r,a=Object.assign({},i,e);(t=a,n=t.host+"/piwik.js",r=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}),r.catch(function(e){console.error("Error loading script",e)}),r).then(function(){var e=a.host,t=a.siteId,i=window.Piwik.getTracker(e+"/piwik.php",t);o.prototype.$piwik=i,o.prototype.$matomo=i,a.requireConsent&&i.requireConsent(),a.trackInitialView&&i.trackPageView(),a.router&&a.router.afterEach(function(e,t){var o=window.location,n=o.protocol;":"!==n.slice(-1)&&(n+=":");var r=n+"//"+o.host+e.path;i.setCustomUrl(r),i.trackPageView(e.name)})})},Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "vue-matomo",
"version": "0.1.8",
"version": "0.1.9",
"description": "Link your Piwik/Matomo installation",

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

@@ -24,2 +24,3 @@ # VueMatomo

Vue.use(VueMatomo, {
// Configure your matomo server and site
host: 'https://matomo.example.com',

@@ -32,3 +33,8 @@ siteId: 5,

// Require consent before sending tracking information to matomo
requireConsent: true
// Default: false
requireConsent: true,
// Whether to track the initial page view
// Default: true
trackInitialView: true
})

@@ -35,0 +41,0 @@

import bootstrap from './bootstrap'
export default function install (Vue, options = {}) {
const defaultOptions = {
requireConsent: false,
trackInitialView: true
}
export default function install (Vue, setupOptions = {}) {
const options = Object.assign({}, defaultOptions, setupOptions)
bootstrap(options)

@@ -18,3 +25,5 @@ .then(() => {

// Register first page view
matomo.trackPageView()
if (options.trackInitialView) {
matomo.trackPageView()
}

@@ -21,0 +30,0 @@ // Track page navigations if router is specified

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