Telemetry enhancements (mainly, data masking improvements)

- data masking is moved to a separate function;
 - hostnames and urls are masked now
 - collect pageview for pages not wrapped in Shell
This commit is contained in:
vklimontovich committed 2021-05-07 20:05:33 +03:00
1 parent 17b880335a
commit 3739d7752d
3 files changed
+41 -6

No files matched your search

+2 -2
View File
@@ -3,7 +3,7 @@ import {useContext, useEffect, useState} from "react";
import { useRouter } from "next/router";
import { signOut, useSession } from 'next-auth/client';
import { MenuIcon, XIcon } from '@heroicons/react/outline';
import {TelemetryContext, useTelemetry} from "../lib/telemetry";
import {collectPageParameters, telemetryEventTypes, useTelemetry} from "../lib/telemetry";
export default function Shell(props) {
const router = useRouter();
@@ -14,7 +14,7 @@ export default function Shell(props) {
useEffect(() => {
telemetry.withJitsu((jitsu) => {
return jitsu.track('page_view', {page_url: router.pathname, page_title: "", source_ip: ""})
return jitsu.track(telemetryEventTypes.pageView, collectPageParameters(router.pathname))
});
}, [telemetry])