.vagrant
app/assets/javascripts/i18n
config/environments/*.local.yml
-config/piwik.yml
config/settings.local.yml
config/settings/*.local.yml
coverage
//= require leaflet.locationfilter
//= require i18n
//= require oauth
-//= require piwik
+//= require matomo
//= require richtext
//= require qs/dist/qs
//= require bs-custom-file-input
}
});
- if (OSM.PIWIK) {
+ if (OSM.MATOMO) {
map.on("layeradd", function (e) {
if (e.layer.options) {
- var goal = OSM.PIWIK.goals[e.layer.options.keyid];
+ var goal = OSM.MATOMO.goals[e.layer.options.keyid];
if (goal) {
- $("body").trigger("piwikgoal", goal);
+ $("body").trigger("matomogoal", goal);
}
}
});
--- /dev/null
+if (OSM.MATOMO) {
+ $(document).ready(function () {
+ var base = document.location.protocol + "//" + OSM.MATOMO.location + "/";
+ var matomoTracker;
+
+ var matomoLoader = $.ajax({
+ url: base + "matomo.js",
+ dataType: "script",
+ cache: true,
+ success: function () {
+ matomoTracker = Matomo.getTracker(base + "matomo.php", OSM.MATOMO.site);
+
+ if (OSM.user) {
+ matomoTracker.setUserId(OSM.user.toString());
+ }
+
+ matomoTracker.trackPageView();
+ matomoTracker.enableLinkTracking();
+
+ $("meta[name=matomo-goal]").each(function () {
+ matomoTracker.trackGoal($(this).attr("content"));
+ });
+ }
+ });
+
+ $("body").on("matomogoal", function (e, goal) {
+ matomoLoader.done(function () {
+ matomoTracker.trackGoal(goal);
+ });
+ });
+ });
+}
//= require qs/dist/qs
OSM = {
-<% if defined?(PIWIK) %>
- PIWIK: <%= PIWIK.to_json %>,
+<% if defined?(Settings.matomo) %>
+ MATOMO: <%= Settings.matomo.to_json %>,
<% end %>
MAX_REQUEST_AREA: <%= Settings.max_request_area.to_json %>,
+++ /dev/null
-if (OSM.PIWIK) {
- $(document).ready(function () {
- var base = document.location.protocol + "//" + OSM.PIWIK.location + "/";
- var piwikTracker;
-
- var piwikLoader = $.ajax({
- url: base + "piwik.js",
- dataType: "script",
- cache: true,
- success: function () {
- piwikTracker = Piwik.getTracker(base + "piwik.php", OSM.PIWIK.site);
-
- if (OSM.user) {
- piwikTracker.setUserId(OSM.user.toString());
- }
-
- piwikTracker.trackPageView();
- piwikTracker.enableLinkTracking();
-
- $("meta[name=piwik-goal]").each(function () {
- piwikTracker.trackGoal($(this).attr("content"));
- });
- }
- });
-
- $("body").on("piwikgoal", function (e, goal) {
- piwikLoader.done(function () {
- piwikTracker.trackGoal(goal);
- });
- });
- });
-}
end
if current_user.save
- flash[:piwik_goal] = PIWIK["goals"]["signup"] if defined?(PIWIK)
+ flash[:matomo_goal] = Settings.matomo["goals"]["signup"] if defined?(Settings.matomo)
referer = welcome_path
<%= tag.link :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => asset_path("osm.xml") %>
<%= tag.meta :name => "description", :content => "OpenStreetMap is the free wiki world map." %>
<%= opengraph_tags(@title) %>
-<% if flash[:piwik_goal] -%>
-<%= tag.meta :name => "piwik-goal", :content => flash[:piwik_goal] %>
+<% if flash[:matomo_goal] -%>
+<%= tag.meta :name => "matomo-goal", :content => flash[:matomo_goal] %>
<% end -%>
<body class="<%= body_class %>">
<%= render :partial => "layouts/header" %>
<%= render :partial => "layouts/content" %>
- <% if defined?(PIWIK) -%>
- <noscript><p><img src="<%= request.protocol %><%= PIWIK["location"] %>/piwik.php?idsite=<%= PIWIK["site"] %>" class="piwik" alt="" /></p></noscript>
+ <% if defined?(Settings.matomo) -%>
+ <noscript><p><img src="<%= request.protocol %><%= Settings.matomo["location"] %>/matomo.php?idsite=<%= Settings.matomo["site"] %>" class="matomo" alt="" /></p></noscript>
<% end -%>
</body>
</html>
"I18n": "readonly",
"L": "readonly",
"OSM": "writable",
- "Piwik": "readonly",
+ "Matomo": "readonly",
"Qs": "readonly",
"updateLinks": "readonly"
},
+++ /dev/null
-require "yaml"
-
-if File.exist?(piwik_file = File.expand_path("../piwik.yml", __dir__))
- PIWIK = YAML.load_file(piwik_file)
-end
:report_uri => []
}
-csp_policy[:connect_src] << PIWIK["location"] if defined?(PIWIK)
-csp_policy[:img_src] << PIWIK["location"] if defined?(PIWIK)
-csp_policy[:script_src] << PIWIK["location"] if defined?(PIWIK)
+csp_policy[:connect_src] << Settings.matomo["location"] if defined?(Settings.matomo)
+csp_policy[:img_src] << Settings.matomo["location"] if defined?(Settings.matomo)
+csp_policy[:script_src] << Settings.matomo["location"] if defined?(Settings.matomo)
csp_policy[:img_src] << Settings.avatar_storage_url if Settings.key?(:avatar_storage_url)
csp_policy[:img_src] << Settings.trace_image_storage_url if Settings.key?(:trace_image_storage_url)
smtp_authentication: null
smtp_user_name: null
smtp_password: null
+# Matomo settings for analytics
+#matomo: