The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix
Steven Teyf873d4c13450
diff --git a/apps/web/app/app.dub.co/(onboarding)/onboarding/welcome/page.tsx b/apps/web/app/app.dub.co/(onboarding)/onboarding/welcome/page.tsxindex 56e5183a12..4b1dd1b815 100644--- a/apps/web/app/app.dub.co/(onboarding)/onboarding/welcome/page.tsx+++ b/apps/web/app/app.dub.co/(onboarding)/onboarding/welcome/page.tsx@@ -1,33 +1,37 @@import { Wordmark } from "@dub/ui";import { NextButton } from "../next-button";+import TrackSignup from "./track-signup";export default function Welcome() {return (- <div className="relative mx-auto mt-24 flex max-w-sm flex-col items-center px-3 text-center md:mt-32 md:px-8 lg:mt-48">- <div className="animate-slide-up-fade relative flex w-auto items-center justify-center px-6 py-2 [--offset:20px] [animation-duration:1.3s] [animation-fill-mode:both]">- <div className="absolute inset-0 opacity-10">- {[...Array(3)].map((_, i) => (- <div- key={i}- className="animate-pulse-scale absolute inset-0 rounded-full mix-blend-color-burn"- style={{- animationDelay: `${i * -2}s`,- backgroundImage: `linear-gradient(90deg, #000, transparent, #000)`,- }}- />- ))}+ <>+ <TrackSignup />+ <div className="relative mx-auto mt-24 flex max-w-sm flex-col items-center px-3 text-center md:mt-32 md:px-8 lg:mt-48">+ <div className="animate-slide-up-fade relative flex w-auto items-center justify-center px-6 py-2 [--offset:20px] [animation-duration:1.3s] [animation-fill-mode:both]">+ <div className="absolute inset-0 opacity-10">+ {[...Array(3)].map((_, i) => (+ <div+ key={i}+ className="animate-pulse-scale absolute inset-0 rounded-full mix-blend-color-burn"+ style={{+ animationDelay: `${i * -2}s`,+ backgroundImage: `linear-gradient(90deg, #000, transparent, #000)`,+ }}+ />+ ))}+ </div>+ <Wordmark className="relative h-16" />+ </div>+ <h1 className="animate-slide-up-fade mt-10 text-2xl font-medium [--offset:10px] [animation-delay:250ms] [animation-duration:1s] [animation-fill-mode:both]">+ Welcome to Dub+ </h1>+ <p className="animate-slide-up-fade mt-2 text-gray-500 [--offset:10px] [animation-delay:500ms] [animation-duration:1s] [animation-fill-mode:both]">+ Dub gives you marketing superpowers with short links that stand out.+ </p>+ <div className="animate-slide-up-fade mt-10 w-full [--offset:10px] [animation-delay:750ms] [animation-duration:1s] [animation-fill-mode:both]">+ <NextButton text="Get started" step="workspace" /></div>- <Wordmark className="relative h-16" />- </div>- <h1 className="animate-slide-up-fade mt-10 text-2xl font-medium [--offset:10px] [animation-delay:250ms] [animation-duration:1s] [animation-fill-mode:both]">- Welcome to Dub- </h1>- <p className="animate-slide-up-fade mt-2 text-gray-500 [--offset:10px] [animation-delay:500ms] [animation-duration:1s] [animation-fill-mode:both]">- Dub gives you marketing superpowers with short links that stand out.- </p>- <div className="animate-slide-up-fade mt-10 w-full [--offset:10px] [animation-delay:750ms] [animation-duration:1s] [animation-fill-mode:both]">- <NextButton text="Get started" step="workspace" /></div>- </div>+ </>);}diff --git a/apps/web/app/app.dub.co/(onboarding)/onboarding/welcome/track-signup.tsx b/apps/web/app/app.dub.co/(onboarding)/onboarding/welcome/track-signup.tsxnew file mode 100644index 0000000000..362f28a34d--- /dev/null+++ b/apps/web/app/app.dub.co/(onboarding)/onboarding/welcome/track-signup.tsx@@ -0,0 +1,24 @@+"use client";++import { useSession } from "next-auth/react";+import { usePlausible } from "next-plausible";+import posthog from "posthog-js";+import { useEffect } from "react";++export default function TrackSignup() {+ const plausible = usePlausible();+ const { data: session } = useSession();++ useEffect(() => {+ plausible("Signed Up");+ if (session?.user) {+ posthog.identify(session.user["id"], {+ email: session.user.email,+ name: session.user.name,+ });+ posthog.capture("user_signed_up");+ }+ }, [session?.user]);++ return null;+}diff --git a/apps/web/ui/modals/accept-invite-modal.tsx b/apps/web/ui/modals/accept-invite-modal.tsxindex deecc4174c..03ff173d9b 100644--- a/apps/web/ui/modals/accept-invite-modal.tsx+++ b/apps/web/ui/modals/accept-invite-modal.tsx@@ -1,7 +1,6 @@import useWorkspace from "@/lib/swr/use-workspace";import { LoadingDots, Logo, Modal } from "@dub/ui";import { useSession } from "next-auth/react";-import { usePlausible } from "next-plausible";import Link from "next/link";import { useParams } from "next/navigation";import posthog from "posthog-js";@@ -26,7 +25,6 @@ function AcceptInviteModal({const [accepting, setAccepting] = useState(false);const { error } = useWorkspace();const { data: session } = useSession();- const plausible = usePlausible();return (<Modal