0.0.6 • Published 3 years ago

analytics-plugin-plausible v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Analytics Plausible Plugin

This adds Analytics support for Plausible

Installation

npm install analytics analytics-plugin-plausible --save

Usage

import Analytics from "analytics"
import plausiblePlugin from "analytics-plugin-plausible"

const analytics = Analytics({
  app: "myapp",
  plugins: [
    plausiblePlugin({
      domain: "example.com", // By default window.location.hostname
      hashMode: true, // By default 'false'
      trackLocalhost: true, // By default 'false'
      apiHost: "https://my-plausible-api.domain.com/", // By default 'https://plausible.io'
    }),
  ],
})

Options

plausiblePlugin() accepts some options that you may want to provide:

OptionTypeDescriptionDefault
domainstringYour site's domain, as declared by you in Plausible's settingslocation.hostname
hashModeboolEnables tracking based on URL hash changes.false
trackLocalhostboolEnables tracking on localhost.false
apiHoststringPlausible's API host to use. Change this if you are self-hosting.'https://plausible.io'
0.0.5

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago