0.0.2 • Published 4 years ago

netlify-plugin-plausible v0.0.2

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

Netlify Plausible Analytics plugin

Plausible is a lightweight and open-source website analytics tool. No cookies and fully compliant with GDPR, CCPA and PECR. Made and hosted in the EU

Once site is built, this plugin adds the Plausible script to any html files automatically, using build environment variables or plugin inputs to define various script-settings.

Installation

To install, add the following lines to your netlify.toml file:

[[plugins]]
package = "netlify-plugin-plausible"

Note: The [[plugins]] line is required for each plugin, even if you have other plugins in your netlify.toml file already.

Configuration/Inputs

# netlify.toml
[[plugins]]
  package = "netlify-plugin-plausible"
    [plugins.inputs]
		PLAUSIBLE__HOST = "plausible.io"
		PLAUSIBLE__SITE_ID = "yourdomain.com"
		PLAUSIBLE__SCRIPTS = "hash,outbound-links"

These same configuration options and names can be used as Build Environment Variables to be edited in the Netlify UI or your netlify.toml

PLAUSIBLE__HOST

String. The Plausible analytics host to send data to, change this if you are self-hosting. Defaults to "plausible.io"

PLAUSIBLE__SITE_ID

String. The Plausible analytics domain you want to send events for - the same domain that you set when creating the site in Plausible, and that you see in the data-domain field of the snippet on the Plausible dashboard. (Required)

PLAUSIBLE__SCRIPTS

Comma-separated String. The script types you want to load, currently available options are hash, and outbound-links. (Optional)

0.0.2-alpha

4 years ago

0.0.2

4 years ago