Skip to main content

Plausible Analytics for Material

Plausible Analytics is a simple, open-source, lightweight and privacy-friendly web analytics alternative to Google Analytics.

This plugin implements Plausible Analytics support in Material for MkDocs.

Live demo

Quick start

  1. Install the plugin:

    pip install material-plausible-plugin
    
  2. Add the following lines to mkdocs.yml:

    plugins:
      - material-plausible
    
    extra:
      analytics:
        provider: plausible
        domain: example.com
    
        #: If using custom domain proxy or self-hosting Plausible,
        #: uncomment and specify script path here:
        # src: "https://plausible.example.com/js/plausible.js"
    
        #: If you’re using the privacy plugin or hosting the script
        #: on another domain, uncomment and specify API path here:
        # api: "https://plausible.example.com/api/event"
    

Feedback widget

To enable the feedback widget, add the following lines inside the extra.analytics block:

feedback:
  title: Was this page helpful?
  ratings:
    - icon: material/emoticon-happy-outline
      name: This page was helpful
      data: good
      note: >-
        Thanks for your feedback!

    - icon: material/emoticon-sad-outline
      name: This page could be improved
      data: bad
      note: >-
        Thanks for your feedback! Help us improve this page by
        using our <a href="..." target="_blank" rel="noopener">feedback form</a>.

Then in your Plausible account, go to your website's settings and visit the Goals section. For each rating defined, click on the + Add goal button, select Custom event as the goal trigger and enter Feedback: {rating data value}.

For example, if you have two ratings – good and bad, add Feedback: good and Feedback: bad goals.

Ratings will be shown in the Goal Conversions section at the very bottom of the page, as soon as any are available:

image

You can click on a specific “goal” to filter your dashboard by it. For example, if you filter by the Feedback: bad goal, you can see which pages need the most attention in the Top Pages section.

Site search

You can track site search usage, too. Enable the search plugin, then in the Goals section, set up a goal named Search. On your statistics page, you can click it in the goals list to see what terms your users are searching for:

image

License

material-plausible-plugin is distributed under the terms of the ISC license.

Metadata

Release files for material-plausible-plugin 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for material-plausible-plugin 0.3.0
File Size Uploaded
material_plausible_plugin-0.3.0.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for material-plausible-plugin 0.3.0
File Interpreter ABI Platform
material_plausible_plugin-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 kB

Release files / material_plausible_plugin-0.3.0.tar.gz

Download URL material_plausible_plugin-0.3.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
31c872608bfa4e94ef05c128f7bf1e476c55b0576ba418a983977a75216d10cc
BLAKE2b-256 checksum
How to use checksums
27e673f7206cfbbcfaf083466ecc5f164a4742111beecfe2d5d87f8273e1800e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.12.3 Darwin/23.6.0

Release files / material_plausible_plugin-0.3.0-py3-none-any.whl

Download URL material_plausible_plugin-0.3.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e1cbaf0eef86dbd34fafa2f25830960416c989f80e0b1d1fabceed6cf6b40aa
BLAKE2b-256 checksum
How to use checksums
3242097a9eee92b2b96979823ae55b2b42fba590f79f979a0b24138db628fac4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.12.3 Darwin/23.6.0

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page