Need help with jekyll-analytics?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

hendrikschneider
183 Stars 21 Forks MIT License 97 Commits 20 Opened issues

Description

Plugin to easily add webanalytics to your jekyll site. Currently Google Analytics, Piwik and mPulse are supported.

Services available

!
?

Need anything else?

Contributors list

# 146,669
CSS
HTML
faceboo...
celery
46 commits
# 119,897
sqlite3
Electro...
Qt
OCaml
2 commits
# 146,715
Ruby
puppet
Shell
Clojure
2 commits
# 2,221
Django
generic
jython
circlec...
1 commit
# 682,417
jekyll-...
Ruby
Jekyll
1 commit
# 622,997
jekyll-...
Ruby
Jekyll
1 commit
# 50,091
React N...
TypeScr...
create-...
React
1 commit
# 49,043
Chrome
javascr...
rails-g...
Rails
1 commit
# 653,241
C++
Shell
jekyll-...
Ruby
1 commit
# 12,066
ip-addr...
nix
whatsap...
gatsby
1 commit
# 560,017
ical
ics
HTML
CSS
1 commit
# 705,849
jekyll-...
Ruby
Jekyll
1 commit

Build Status Maintainability

Jekyll::analytics

Webanalytics for Jekyll.

There are many tutorials online to add analytics to Jekyll by extending the template. Jekyll-analytics is here to take care of this. Just install the plugin, configure it and you are done :)

Jekyll-analytics: Webanalytics made easy.

Supported: - Google Analytics - Matomo - Piwik - mPulse - Plausible

Installation

Add this to your

Gemfile
:
gem 'jekyll-analytics'

Then execute

$ bundle
Or install it yourself
gem install jekyll-analytics

Configuration

Edit

_config.yml
to use the plugin:
plugins:
  - jekyll-analytics

Configure the plugin in

_config.yml
by adding:
jekyll_analytics:
  GoogleAnalytics:          # Add, if you want to track with Google Analytics
    id: UA-123-456          # Required - replace with your tracking id
    anonymizeIp: false      # Optional - Default: false - set to true for anonymized tracking

Matomo: # Add, if you want to track with Matomo (former Piwik Analytics) url: matomo.example.com # Required - url to Matomo installation without trailing / siteId: "1234" # Required - replace with your Matomo site id (Write id as string)

Piwik: # Add, if you want to track with Piwik url: piwik.example.com # Required - url to Piwik installation without trailing / siteId: "1234" # Required - replace with your Piwik site id (Write id as string)

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

Tracking will be disabled in development mode. To enable production mode set enviroment variable JEKYLLENV=production. Github pages automatically sets JEKYLLENV to production. For testing use

$ JEKYLL_ENV=production jekyll serve

Contributing

  1. Fork it ( https://github.com/hendrikschneider/jekyll-analytics/fork )
  2. Create your feature branch (
    git checkout -b my-new-feature
    )
  3. Commit your changes (
    git commit -am 'Add some feature'
    )
  4. Push to the branch (
    git push origin my-new-feature
    )
  5. Create a new Pull Request

How to add support for a new tracker: 1. Create new tracker class in lib/analytics/YourTracker.rb ``` #initialize and render must be implemented! class YourTracker def initialize(config) #validate config end

def render
  return "Tracking code to insert into html > head"
end

end ``` 2. Update README.md

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.