diff --git a/web/src/app/ee/admin/performance/custom-analytics/CustomAnalyticsUpdateForm.tsx b/web/src/app/ee/admin/performance/custom-analytics/CustomAnalyticsUpdateForm.tsx index bb7372924..c542a69eb 100644 --- a/web/src/app/ee/admin/performance/custom-analytics/CustomAnalyticsUpdateForm.tsx +++ b/web/src/app/ee/admin/performance/custom-analytics/CustomAnalyticsUpdateForm.tsx @@ -3,15 +3,12 @@ import { Label, SubLabel } from "@/components/admin/connectors/Field"; import { usePopup } from "@/components/admin/connectors/Popup"; import { SettingsContext } from "@/components/settings/SettingsProvider"; -import { Button, Text } from "@tremor/react"; +import { Button, Callout, Text } from "@tremor/react"; import { useContext, useState } from "react"; export function CustomAnalyticsUpdateForm() { const settings = useContext(SettingsContext); - if (!settings) { - return null; - } - const customAnalyticsScript = settings.customAnalyticsScript; + const customAnalyticsScript = settings?.customAnalyticsScript; const [newCustomAnalyticsScript, setNewCustomAnalyticsScript] = useState(customAnalyticsScript || ""); @@ -19,63 +16,17 @@ export function CustomAnalyticsUpdateForm() { const { popup, setPopup } = usePopup(); + if (!settings) { + return ; + } + return (
{popup} -
- - - Specify the Javascript that should run on page load in order to - initialize your custom tracking/analytics. - - - Do not include the{" "} - <script></script> tags. - If you upload a script below but you are not recieving any events in - your analytics platform, try removing all extra whitespace before each - line of JavaScript. - -