From 388ee3de0da6c6550c76c9ec912e1a01c0553f72 Mon Sep 17 00:00:00 2001
From: anonymous <anonymous>
Date: Wed, 27 Mar 2019 15:03:12 +0100
Subject: [PATCH] ODPSH-124

---
 ckanext/odsh/fanstatic/odsh_spatial_query.js |  1 -
 ckanext/odsh/templates/base.html             | 21 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/ckanext/odsh/fanstatic/odsh_spatial_query.js b/ckanext/odsh/fanstatic/odsh_spatial_query.js
index 2c9825d4..b159838d 100644
--- a/ckanext/odsh/fanstatic/odsh_spatial_query.js
+++ b/ckanext/odsh/fanstatic/odsh_spatial_query.js
@@ -111,7 +111,6 @@ this.ckan.module('odsh-spatial-query', function ($, _)
       //     resolutions: [2000, 1100, 550, 275, 100, 50, 25, 10, 5, 2, 1, 0.5, 0.25]//,
       //     //origin: [0, 0]
       //   }),
-      console.log(this.options.map_config)
       map = ckan.commonLeafletMap(
         'dataset-map-container',
         this.options.map_config,
diff --git a/ckanext/odsh/templates/base.html b/ckanext/odsh/templates/base.html
index 2340eaa8..7a237711 100644
--- a/ckanext/odsh/templates/base.html
+++ b/ckanext/odsh/templates/base.html
@@ -6,4 +6,25 @@
 <link rel="stylesheet" href="/odsh.css?refresh={{ range(1,10000) | random }}" />
 <link rel="stylesheet" href="/odsh_header.css?refresh={{ range(1,10000) | random }}" />
 <link rel="stylesheet" href="/bootstrap-multiselect.css" />
+{% endblock %}
+
+{% block head_extras %}
+{{ super() }}
+{% set matomo_url = 'https://phpefi.schleswig-holstein.de/gsb_analytics/'%}
+<!-- Matomo -->
+<script type="text/javascript">
+  var _paq = _paq || [];
+  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
+  _paq.push(['trackPageView']);
+  _paq.push(['enableLinkTracking']);
+  (function() {
+    var u="{{matomo_url}}";
+    _paq.push(['setTrackerUrl', u+'piwik.php']);
+    _paq.push(['setSiteId', '1']);
+    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
+  })();
+</script>
+<noscript><p><img src="{{matomo_url}}/piwik.php?idsite=3" style="border:0;" alt="" /></p></noscript>
+<!-- End Matomo Code -->
 {% endblock %}
\ No newline at end of file
-- 
GitLab