Skip to content
Snippets Groups Projects
Commit 4d65b7e0 authored by sandcha's avatar sandcha
Browse files

Ignore /connection visits

parent 5b066cf3
No related branches found
No related tags found
1 merge request!109Filter IR visits
......@@ -8,8 +8,13 @@ export class Matomo extends PureComponent {
dangerouslySetInnerHTML={{
__html: ` var _paq = window._paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
var pagePath = window.location.pathname;
var isConnectionPage = pagePath.includes("connection");
_paq.push(['setDocumentTitle', isConnectionPage ? pagePath.substring(0, pagePath.lastIndexOf('/')) : pagePath]);
if (!isConnectionPage){
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
};
(function() {
var u="https://leximpact.matomo.cloud/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment