X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/007e1b26cd293686ab6236750db41bd5fb1cf5a1..8b840c650629d45e79f99811e9062aea5e130e33:/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();