if (OSM.MATOMO) {
- $(document).ready(function () {
- const base = document.location.protocol + "//" + OSM.MATOMO.location + "/";
+ $(function () {
+ const base = location.protocol + "//" + OSM.MATOMO.location + "/";
let matomoTracker;
const matomoLoader = $.ajax({