>({});
const authStore = useAuthStore();
const components = useBosComponents();
+ const cookieData = useCookiePreferences();
useEffect(() => {
setComponentSrc(componentSrc);
@@ -137,6 +139,7 @@ const ViewComponentPage: NextPageWithLayout = () => {
privacyDomainName,
}}
/>
+
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
index 947a84ad1..4d7caccf3 100644
--- a/src/pages/_app.tsx
+++ b/src/pages/_app.tsx
@@ -15,6 +15,8 @@ import { useEffect } from 'react';
import { Toaster } from '@/components/lib/Toast';
import { useBosLoaderInitializer } from '@/hooks/useBosLoaderInitializer';
import { useClickTracking } from '@/hooks/useClickTracking';
+import { useCookiePreferences } from '@/hooks/useCookiePreferences';
+import { useBosComponents } from '@/hooks/useBosComponents';
import { useHashUrlBackwardsCompatibility } from '@/hooks/useHashUrlBackwardsCompatibility';
import { usePageAnalytics } from '@/hooks/usePageAnalytics';
import { useAuthStore } from '@/stores/auth';
@@ -22,6 +24,7 @@ import { init as initializeAnalytics } from '@/utils/analytics';
import { setNotificationsLocalStorage } from '@/utils/notificationsLocalStorage';
import type { NextPageWithLayout } from '@/utils/types';
import { styleZendesk } from '@/utils/zendesk';
+import { VmComponent } from '@/components/vm/VmComponent';
const VmInitializer = dynamic(() => import('../components/vm/VmInitializer'), {
ssr: false,
@@ -41,6 +44,8 @@ export default function App({ Component, pageProps }: AppPropsWithLayout) {
const signedIn = useAuthStore((store) => store.signedIn);
const accountId = useAuthStore((store) => store.accountId);
const componentSrc = router.query;
+ const cookieData = useCookiePreferences();
+ const components = useBosComponents();
useEffect(() => {
// this check is needed to init localStorage for notifications after user signs in
@@ -138,6 +143,7 @@ export default function App({ Component, pageProps }: AppPropsWithLayout) {
+
{
recordPageView(pageName);
@@ -129,6 +135,7 @@ export const recordMouseEnter = (e: UIEvent) => record('mouseover', e);
export const recordTouchStart = (e: UIEvent | PointerEvent) => record('touchstart', e);
export function recordWalletConnect(accountId: string) {
+ if (cookieOptOut) return;
if (!localStorage.getItem('hashId')) {
setAccountIdHash(accountId);
recordEvent('wallet-connected');
@@ -136,7 +143,7 @@ export function recordWalletConnect(accountId: string) {
}
export function reset() {
- if (!rudderAnalytics) return;
+ if (!rudderAnalytics || cookieOptOut) return;
try {
recordEvent('wallet-logout');
localStorage.removeItem('hashId');
@@ -149,7 +156,7 @@ export function reset() {
}
export function recordEventWithProps(eventLabel: string, properties: Record) {
- if (!rudderAnalytics) return;
+ if (!rudderAnalytics || cookieOptOut) return;
try {
rudderAnalytics.track(eventLabel, {
...properties,
@@ -167,7 +174,7 @@ export function recordHandledError(props: Record) {
}
export function recordEvent(eventLabel: string) {
- if (!rudderAnalytics) return;
+ if (!rudderAnalytics || cookieOptOut) return;
try {
rudderAnalytics.track(eventLabel, {
hashId: localStorage.getItem('hashId'),
diff --git a/src/utils/types.ts b/src/utils/types.ts
index 1049040c8..e9a27e4f5 100644
--- a/src/utils/types.ts
+++ b/src/utils/types.ts
@@ -33,7 +33,6 @@ type ProductionNetwork = {
};
export interface TosData {
- showTos: boolean;
agreementsForUser: UserTosAgreement[];
latestTosVersion: number;
}