mirror of
https://github.com/hendrikschneider/jekyll-analytics
synced 2024-11-24 20:53:02 +00:00
Add support for plausible.io
This commit is contained in:
parent
6bb1bf68a1
commit
d7d1fb795d
2 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
10
lib/analytics/plausible.rb
Normal file
10
lib/analytics/plausible.rb
Normal 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
|
Loading…
Reference in a new issue