X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/007e1b26cd293686ab6236750db41bd5fb1cf5a1..2a2d1d50d3ebe1b2b2435317d9ee63e7c0c94b5e:/app/assets/javascripts/matomo.js 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();