X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/007e1b26cd293686ab6236750db41bd5fb1cf5a1..f051a7c1f5d1999558caa9d3cbe8c36f8ac39c9b:/app/assets/javascripts/matomo.js?ds=sidebyside diff --git a/app/assets/javascripts/matomo.js b/app/assets/javascripts/matomo.js index f259b1358..7d147a55c 100644 --- a/app/assets/javascripts/matomo.js +++ b/app/assets/javascripts/matomo.js @@ -14,6 +14,19 @@ if (OSM.MATOMO) { matomoTracker.setUserId(OSM.user.toString()); } + if (OSM.MATOMO.visitor_cookie_timeout) { + matomoTracker.setVisitorCookieTimeout(OSM.MATOMO.visitor_cookie_timeout); + } + + if (OSM.MATOMO.referral_cookie_timeout) { + matomoTracker.setReferralCookieTimeout(OSM.MATOMO.referral_cookie_timeout); + } + + if (OSM.MATOMO.session_cookie_timeout) { + matomoTracker.setSessionCookieTimeout(OSM.MATOMO.session_cookie_timeout); + } + + matomoTracker.setSecureCookie(true); matomoTracker.trackPageView(); matomoTracker.enableLinkTracking();