Add support for plausible.io

This commit is contained in:
David Schmitt 2020-10-11 22:23:47 +01:00
parent 6bb1bf68a1
commit d7d1fb795d
2 changed files with 15 additions and 0 deletions

View file

@ -14,6 +14,7 @@ Supported:
- [Matomo](https://matomo.org/)
- [Piwik](https://piwik.org/)
- [mPulse](https://www.soasta.com/performance-monitoring/)
- [Plausible](https://plausible.io)
## Installation
@ -56,6 +57,10 @@ jekyll_analytics:
MPulse: # Add if you want to track performance with mPulse
apikey: XXXXX-YYYYY-ZZZZZ-AAAAA-23456 # Required - replace with your mPulse API key
Plausible:
domain: 'example.com' # The domain configured in plausible
source: 'https://plausible.example.com/js/plausible.js' # The source of the javascript
```
## Usage

View file

@ -0,0 +1,10 @@
class Plausible
def initialize(config)
@domain = config['domain']
@source = config['source']
end
def render()
return "<script async defer data-domain=\"#{@domain}\" src=\"#{@source}\"></script>"
end
end