Skip to main content

Plausible Analytics implementation for Material for MkDocs

Project description

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.

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"
    
        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>.
    
  3. 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.

License

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

material_plausible_plugin-0.1.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

material_plausible_plugin-0.1.1-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page