LukasRos / plugin-plausible

Adds Plausible Analytics to a blog hosted on micro.blog
Mozilla Public License 2.0
2 stars 2 forks source link

I'm considering making similar plugin for other indie privacy analytics: e.g. SimpleAnalytics #2

Open w4rner opened 3 years ago

w4rner commented 3 years ago

I'm a n00b and haven't created a Micro.Blog plugin before. As far as I'm aware, would be almost identical, except I would change html to have script reading:

<script data-mode=“hash” async defer src=“https://scripts.simpleanalyticscdn.com/latest.js”></script>
<noscript><img src=“https://queue.simpleanalyticscdn.com/noscript.gif” alt=“”></noscript>

instead of

<script async defer data-domain="{{ .Site.Params.blog_domain }}" src="https://plausible.io/js/plausible.js"></script>

However, rather than going at the end of it should go at the end of as per guidelines. How do I change where html is inserted? Do I tweak the includes section of the json?

Also there's no need to ask for custom domain, so I could remove:

"fields": [
        {
            "field": "params.blog_domain",
            "label": "Blog Domain",
            "placeholder": "Hostname registered at plausible.io."
        }

in the json file.

Do you have any other advice @LukasRos before I embark?

adriaandotcom commented 3 years ago

I see you are using insted of ". This is likely due to the text editor you use. Make sure to use a code editor.