diff --git a/apps/sim/app/(auth)/signup/signup-form.tsx b/apps/sim/app/(auth)/signup/signup-form.tsx index 94c4b74dfee..61ad48a8328 100644 --- a/apps/sim/app/(auth)/signup/signup-form.tsx +++ b/apps/sim/app/(auth)/signup/signup-form.tsx @@ -5,7 +5,9 @@ import { Turnstile, type TurnstileInstance } from '@marsidev/react-turnstile' import { createLogger } from '@sim/logger' import { useRouter, useSearchParams } from 'next/navigation' import { usePostHog } from 'posthog-js/react' +import { trackGoogleEvent } from '@/lib/analytics/google' import { client, useSession } from '@/lib/auth/auth-client' +import { useTrackingConsent } from '@/lib/consent/tracking-consent' import { getEnv, isFalsy } from '@/lib/core/config/env' import { isSsoEnabled } from '@/lib/core/config/env-flags' import { validateCallbackUrl } from '@/lib/core/security/input-validation' @@ -107,6 +109,7 @@ function SignupFormContent({ const searchParams = useSearchParams() const { refetch: refetchSession } = useSession() const posthog = usePostHog() + const { measurement } = useTrackingConsent() const [isLoading, setIsLoading] = useState(false) useEffect(() => { @@ -344,6 +347,8 @@ function SignupFormContent({ return } + if (measurement) trackGoogleEvent('sign_up', { method: 'email' }) + try { await refetchSession() logger.info('Session refreshed after successful signup') diff --git a/apps/sim/app/(landing)/components/footer/footer.tsx b/apps/sim/app/(landing)/components/footer/footer.tsx index 1fedf3b0226..5c74a5a7e8f 100644 --- a/apps/sim/app/(landing)/components/footer/footer.tsx +++ b/apps/sim/app/(landing)/components/footer/footer.tsx @@ -1,4 +1,5 @@ import Link from 'next/link' +import { ConsentPreferencesTrigger } from '@/app/_shell/consent/consent-preferences-trigger' import { ALL_COMPETITORS } from '@/app/(landing)/comparisons/utils' import { SimWordmark } from '@/app/(landing)/components/navbar/components/sim-wordmark' import { MODEL_PROVIDERS_WITH_CATALOGS } from '@/app/(landing)/models/utils' @@ -19,14 +20,25 @@ import { MODEL_PROVIDERS_WITH_CATALOGS } from '@/app/(landing)/models/utils' */ const LINK_CLASS = - 'text-sm text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]' + 'text-left text-sm text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]' -interface FooterItem { +interface FooterLinkItem { label: string href: string external?: boolean } +interface FooterConsentItem { + label: string + consentPreferences: true +} + +type FooterItem = FooterLinkItem | FooterConsentItem + +interface FooterProps { + showConsentPreferences?: boolean +} + /** * Platform modules link to their local landing pages (internal link equity * stays on the ranking pages); docs-only surfaces (MCP, API, Self Hosting) @@ -108,27 +120,37 @@ const SOCIAL_LINKS: FooterItem[] = [ const LEGAL_LINKS: FooterItem[] = [ { label: 'Terms of Service', href: '/terms' }, { label: 'Privacy Policy', href: '/privacy' }, + { label: 'Cookie Policy', href: '/cookie-policy' }, ] +const CONSENT_PREFERENCES_LINK: FooterConsentItem = { + label: 'Cookie preferences', + consentPreferences: true, +} + function FooterColumn({ title, items }: { title: string; items: FooterItem[] }) { return (

{title}

- {items.map(({ label, href, external }) => - external ? ( + {items.map((item) => + 'consentPreferences' in item ? ( + + {item.label} + + ) : item.external ? ( - {label} + {item.label} ) : ( - - {label} + + {item.label} ) )} @@ -137,7 +159,7 @@ function FooterColumn({ title, items }: { title: string; items: FooterItem[] }) ) } -export function Footer() { +export function Footer({ showConsentPreferences = false }: FooterProps) { return (