Added Matomo tracking pixel

This commit is contained in:
Hendrik Schneider 2019-10-19 21:15:30 +02:00
parent da24705b17
commit 9ca90d930f
3 changed files with 23 additions and 11 deletions

View file

@ -1,7 +1,7 @@
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = 'jekyll-analytics' s.name = 'jekyll-analytics'
s.version = '0.1.11' s.version = '0.1.12'
s.date = '2018-05-04' s.date = '2018-05-04'
s.summary = "Jekyll plugin " s.summary = "Jekyll plugin "
s.description = "Plugin to easily add web analytics to your jekyll site without modifying your templates. Supported are: Google Analytics, Piwik, Matomo, MPulse" s.description = "Plugin to easily add web analytics to your jekyll site without modifying your templates. Supported are: Google Analytics, Piwik, Matomo, MPulse"

View file

@ -1,6 +1,12 @@
class Matomo class Matomo
SETUP_CODE = """ SETUP_CODE = """
<!-- Matomo --> <!-- Matomo -->
<!-- Matomo Image Tracker -->
<img src=\"%{url}?idsite=%{siteId}&amp;rec=1\" style=\"border:0\" alt=\"\" />
<!-- End Matomo -->
<script type=\"text/javascript\"> <script type=\"text/javascript\">
var _paq = _paq || []; var _paq = _paq || [];
_paq.push(['trackPageView']); _paq.push(['trackPageView']);

View file

@ -13,6 +13,12 @@ class MatomoTest < Test::Unit::TestCase
assert_equal(matomoAnalytics.render(), assert_equal(matomoAnalytics.render(),
""" """
<!-- Matomo --> <!-- Matomo -->
<!-- Matomo Image Tracker -->
<img src=\"my.matomo.server/path?idsite=1&amp;rec=1\" style=\"border:0\" alt=\"\" />
<!-- End Matomo -->
<script type=\"text/javascript\"> <script type=\"text/javascript\">
var _paq = _paq || []; var _paq = _paq || [];
_paq.push(['trackPageView']); _paq.push(['trackPageView']);