Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# plugin-plausible
Adds Plausible Analytics to a blog hosted on micro.blog

- Supports using a custom tracker domain: https://docs.plausible.io/custom-domain
2 changes: 1 addition & 1 deletion layouts/partials/plausible.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<script async defer data-domain="{{ .Site.Params.blog_domain }}" src="https://plausible.io/js/plausible.js"></script>
<script async defer data-domain="{{ .Site.Params.blog_domain }}" src="https://{{ if .Site.Params.plausible_domain }}{{ .Site.Params.plausible_domain }}{{ else }}plausible.io{{ end }}/js/plausible.js"></script>
7 changes: 6 additions & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.0",
"version": "1.1.0",
"title": "Plausible Analytics",
"description": "Includes Plausible Analytics code.",
"includes": [
Expand All @@ -10,6 +10,11 @@
"field": "params.blog_domain",
"label": "Blog Domain",
"placeholder": "Hostname registered at plausible.io."
},
{
"field": "params.plausible_domain",
"label": "Plausible Domain (Optional)",
"placeholder": "Custom domain to load tracker script from."
}
]
}