diff --git a/sigal/settings.py b/sigal/settings.py index e59e762..b379d44 100644 --- a/sigal/settings.py +++ b/sigal/settings.py @@ -38,6 +38,7 @@ _DEFAULT_CONFIG = { 'destination': '_build', 'files_to_copy': (), 'google_analytics': '', + 'piwik': {'tracker_url': '', 'site_id': 0}, 'ignore_directories': [], 'ignore_files': [], 'img_processor': 'ResizeToFit', diff --git a/sigal/templates/sigal.conf.py b/sigal/templates/sigal.conf.py index dabf9f4..f11eb52 100644 --- a/sigal/templates/sigal.conf.py +++ b/sigal/templates/sigal.conf.py @@ -158,6 +158,11 @@ ignore_files = [] # Google Analytics tracking code (UA-xxxx-x) # google_analytics = '' +# Piwik tracking +# tracker_url must not contain trailing slash. +# Example : {'tracker_url': 'http://stats.domain.com', 'site_id' : 2} +# piwik = {'tracker_url': '', 'site_id' : 0} + # Set zip_gallery to either False or a file name. The final archive will # contain all resized or original files (depending on `zip_media_format`). # zip_gallery = False # False or 'archive.zip' diff --git a/sigal/themes/colorbox/templates/base.html b/sigal/themes/colorbox/templates/base.html index 1ce6469..a4d3945 100644 --- a/sigal/themes/colorbox/templates/base.html +++ b/sigal/themes/colorbox/templates/base.html @@ -44,5 +44,6 @@ {% block footer %}{% endblock %} {% include 'analytics.html' %} + {% include 'piwik.html' %} diff --git a/sigal/themes/colorbox/templates/index.html b/sigal/themes/colorbox/templates/index.html index 373e95c..2e624ee 100644 --- a/sigal/themes/colorbox/templates/index.html +++ b/sigal/themes/colorbox/templates/index.html @@ -142,4 +142,4 @@ }); {% endif %} -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/sigal/themes/default/templates/piwik.html b/sigal/themes/default/templates/piwik.html new file mode 100644 index 0000000..29c099a --- /dev/null +++ b/sigal/themes/default/templates/piwik.html @@ -0,0 +1,17 @@ +{% if settings.piwik.tracker_url and settings.piwik.site_id %} + + + + +{% endif %} \ No newline at end of file diff --git a/sigal/themes/galleria/templates/index.html b/sigal/themes/galleria/templates/index.html index 40a4ad7..9f35762 100644 --- a/sigal/themes/galleria/templates/index.html +++ b/sigal/themes/galleria/templates/index.html @@ -150,5 +150,6 @@ {% endif %} {% include 'analytics.html' %} + {% include 'piwik.html' %}