diff --git a/assets/js/app.tsx b/assets/js/app.tsx index 31624e7b..7d91b162 100644 --- a/assets/js/app.tsx +++ b/assets/js/app.tsx @@ -12,7 +12,7 @@ import ReactDOM from "react-dom"; import App from "./components/App"; import * as Sentry from "@sentry/react"; -import * as FullStory from "@fullstory/browser"; +import { FullStory, init as initFullStory } from "@fullstory/browser"; const environment = document .querySelector("meta[name=environment-name]") @@ -40,7 +40,14 @@ const fullstoryOrgId = document ?.getAttribute("content"); if (fullstoryOrgId) { - FullStory.init({ orgId: fullstoryOrgId, recordCrossDomainIFrames: true }); + initFullStory({ orgId: fullstoryOrgId, recordCrossDomainIFrames: true }); + + if (username) { + FullStory("setIdentity", { + uid: username, + properties: { displayName: username }, + }); + } } ReactDOM.render(, document.getElementById("app")); diff --git a/assets/package-lock.json b/assets/package-lock.json index 425f21cf..30f351bf 100644 --- a/assets/package-lock.json +++ b/assets/package-lock.json @@ -6,7 +6,7 @@ "": { "license": "MIT", "dependencies": { - "@fullstory/browser": "^1.6.2", + "@fullstory/browser": "^2.0.4", "@heroicons/react": "^1.0.4", "@sentry/react": "^7.14.0", "bootstrap": "^5.1.3", @@ -1800,15 +1800,17 @@ } }, "node_modules/@fullstory/browser": { - "version": "1.7.1", - "license": "MIT", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@fullstory/browser/-/browser-2.0.4.tgz", + "integrity": "sha512-NL/RA5cT7aA3peS/RVryUloqqQkligV4ODt1VKr+ix6vi8sW8B5W79Oe0xHMqwH/ZZ9sYj23lPJm5TgnOEPovg==", "dependencies": { - "@fullstory/snippet": "1.3.1" + "@fullstory/snippet": "2.0.3" } }, "node_modules/@fullstory/snippet": { - "version": "1.3.1", - "license": "ISC" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@fullstory/snippet/-/snippet-2.0.3.tgz", + "integrity": "sha512-EaCuTQSLv5FvnjHLbTxErn3sS1+nLqf1p6sA/c4PV49stBtkUakA0eLhJJdaw0WLdXyEzZXf86lRNsjEzrgGPw==" }, "node_modules/@heroicons/react": { "version": "1.0.6", diff --git a/assets/package.json b/assets/package.json index e9447603..a74e127b 100644 --- a/assets/package.json +++ b/assets/package.json @@ -13,7 +13,7 @@ "check": "npm run lint:check && npm run format:check" }, "dependencies": { - "@fullstory/browser": "^1.6.2", + "@fullstory/browser": "^2.0.4", "@heroicons/react": "^1.0.4", "@sentry/react": "^7.14.0", "bootstrap": "^5.1.3",