1.0.8 • Published 8 months ago

@openmost/nuxt-matomo v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Matomo for Nuxt

npm version npm downloads License Nuxt

Quick Setup

  1. Add @openmost/nuxt-matomo dependency to your project
# Using pnpm
pnpm add -D @openmost/nuxt-matomo

# Using yarn
yarn add --dev @openmost/nuxt-matomo

# Using npm
npm install --save-dev @openmost/nuxt-matomo
  1. Add @openmost/nuxt-matomo to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    '@openmost/nuxt-matomo'
  ]
})

Config

Define variables to your .env file:

NUXT_MATOMO_HOST=https://matomo.my-website.com
NUXT_MATOMO_ID_SITE=1
NUXT_MATOMO_ID_CONTAINER=XXXXXXX

Then register config in the matomo section to your nuxt.config.ts:

runtimeConfig: {
    public: {
      matomo: {
        host: process.env.NUXT_MATOMO_HOST,
        idSite: process.env.NUXT_MATOMO_ID_SITE,
        idContainer: process.env.NUXT_MATOMO_ID_CONTAINER,
      }
    }
  }

Enable or disable features using the matomo key in nuxt.config.js:

export default defineNuxtConfig({

  matomo: {
    enableHeartBeatTimer: true,
    heartBeatTimerActiveTime: 700
  },
  
})
1.0.8

8 months ago

1.0.7

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago