Browse Source

adds Pausible tracker doc

main
buttle 7 months ago
parent
commit
50f7a0c8b7
  1. 18
      README.md
  2. 2
      templates/base.html

18
README.md

@ -13,6 +13,24 @@ Main differences are:
* Articles published under the `Releases` category are displayed in the navbar.
* Google font has been removed.
* Proprietory Social media links have been removed.
* Plausible tracker.
## Plausible tracker
Add a new variable to `pelicanconf.py`
```
DOMAIN="your.domain.com"
```
A script entry is added to the HTML head like so
```
<script defer data-domain="your.domain.com" src="/js/stats.js"></script>
```
`/js/stats.js` must be reversed proxied to point to your Plausible installation.
https://github.com/plausible/analytics/discussions/610#discussioncomment-760105
## Demo

2
templates/base.html

@ -29,7 +29,7 @@
<link href="{{ SITEURL }}/{{ FEED_RSS }}" type="application/atom+xml" rel="alternate"
title="{{ SITENAME }} RSS Feed"/>
{% endif %}
<script defer data-domain="{{SITEURL}}" src="/js/stats.js"></script>
<script defer data-domain="{{ DOMAIN }}" src="/js/stats.js"></script>
{% endblock %}
</head>

Loading…
Cancel
Save