The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
customize apply page
Steven Tey2e4f463a909e
diff --git a/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/apply/success/page.tsx b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/apply/success/page.tsxindex 98ea6a336f..e69ebcf429 100644--- a/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/apply/success/page.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/apply/success/page.tsx@@ -8,6 +8,7 @@ import { notFound } from "next/navigation";import { CSSProperties } from "react";import { ApplyHeader } from "../../header";import { CTAButtons } from "./cta-buttons";+import { PixelConversion } from "./pixel-conversion";import { Screenshot } from "./screenshot";export const dynamic = "force-dynamic";@@ -63,98 +64,104 @@ export default async function SuccessPage({const hasPartnerProfile = !!enrollmentId;return (- <div- className="relative"- style={- {- "--brand": program.brandColor || "#000000",- "--brand-ring": "rgb(from var(--brand) r g b / 0.2)",- } as CSSProperties- }- >- <ApplyHeader program={program} showLogin={false} showApply={false} />- <div className="p-6">- <div className="grid grid-cols-1 gap-5 sm:pt-20">- <h1 className="text-4xl font-semibold">- {hasPartnerProfile- ? "Application submitted"- : "Complete your setup"}- </h1>- <div className="flex flex-col gap-4 text-base text-neutral-700">- {hasPartnerProfile && (- <p>- Your application has been submitted for review.- {application && (- <>- {" "}- You'll receive an update at{" "}- <strong className="font-semibold">- {application.email}- </strong>- .- </>- )}- </p>- )}- {!hasPartnerProfile && (- <p>- Your application to{" "}- <strong className="font-semibold">{program.name}</strong> has- been saved, but you still need to create your{" "}- <strong className="font-semibold">Dub Partners</strong> account- to complete your application.- <br />- <br />- Once you create your account, your application will be submitted- to <b>{program.name}</b> and you'll hear back from them{" "}- <strong className="font-semibold">- {application?.email ? `at ${application.email}` : "via email"}- </strong>- .- </p>- )}+ <>+ {program.slug === "perplexity" && <PixelConversion />}+ <div+ className="relative"+ style={+ {+ "--brand": program.brandColor || "#000000",+ "--brand-ring": "rgb(from var(--brand) r g b / 0.2)",+ } as CSSProperties+ }+ >+ <ApplyHeader program={program} showLogin={false} showApply={false} />+ <div className="p-6">+ <div className="grid grid-cols-1 gap-5 sm:pt-20">+ <h1 className="text-4xl font-semibold">+ {hasPartnerProfile+ ? "Application submitted"+ : "Complete your setup"}+ </h1>+ <div className="flex flex-col gap-4 text-base text-neutral-700">+ {hasPartnerProfile && (+ <p>+ Your application has been submitted for review.+ {application && (+ <>+ {" "}+ You'll receive an update at{" "}+ <strong className="font-semibold">+ {application.email}+ </strong>+ .+ </>+ )}+ </p>+ )}+ {!hasPartnerProfile && (+ <p>+ Your application to{" "}+ <strong className="font-semibold">{program.name}</strong> has+ been saved, but you still need to create your{" "}+ <strong className="font-semibold">Dub Partners</strong>{" "}+ account to complete your application.+ <br />+ <br />+ Once you create your account, your application will be+ submitted to <b>{program.name}</b> and you'll hear back from+ them{" "}+ <strong className="font-semibold">+ {application?.email+ ? `at ${application.email}`+ : "via email"}+ </strong>+ .+ </p>+ )}+ </div></div>- </div>- {/* Buttons */}- <div className="mt-12 flex flex-col gap-3">- <CTAButtons />- </div>+ {/* Buttons */}+ <div className="mt-12 flex flex-col gap-3">+ <CTAButtons />+ </div>- {/* Screenshot */}- <div className="relative mt-16">- <Screenshot- program={{ name: program.name, logo: program.logo }}- className="h-auto w-full rounded border border-black/10 [mask-image:linear-gradient(black_80%,transparent)]"- />- <div className="absolute bottom-0 left-1/2 -translate-x-1/2">- <div className="absolute -inset-[50%] rounded-full bg-white blur-lg" />+ {/* Screenshot */}+ <div className="relative mt-16">+ <Screenshot+ program={{ name: program.name, logo: program.logo }}+ className="h-auto w-full rounded border border-black/10 [mask-image:linear-gradient(black_80%,transparent)]"+ />+ <div className="absolute bottom-0 left-1/2 -translate-x-1/2">+ <div className="absolute -inset-[50%] rounded-full bg-white blur-lg" />- {programSlug !== "dub" && (- <div className="relative flex items-center gap-2 rounded-full border border-neutral-100 bg-gradient-to-b from-white to-neutral-50 p-2 shadow-[0_8px_28px_0_#00000017]">- <img- className="size-10 shrink-0 rounded-full"- src={program.logo || `${OG_AVATAR_URL}${program.name}`}- alt={`${program.name} logo`}- />- <BoltFill className="shrink-0 text-[var(--brand)] opacity-30" />- <Logo className="size-10 shrink-0" />- </div>- )}+ {programSlug !== "dub" && (+ <div className="relative flex items-center gap-2 rounded-full border border-neutral-100 bg-gradient-to-b from-white to-neutral-50 p-2 shadow-[0_8px_28px_0_#00000017]">+ <img+ className="size-10 shrink-0 rounded-full"+ src={program.logo || `${OG_AVATAR_URL}${program.name}`}+ alt={`${program.name} logo`}+ />+ <BoltFill className="shrink-0 text-[var(--brand)] opacity-30" />+ <Logo className="size-10 shrink-0" />+ </div>+ )}+ </div></div>- </div>- {/* Feature grid */}- <div className="mt-16 grid grid-cols-1 gap-10 sm:grid-cols-2">- {FEATURES.map(({ icon: Icon, title, description }) => (- <div key={title} className="flex flex-col gap-2.5 text-sm">- <Icon className="size-4 shrink-0 text-[var(--brand)]" />- <h3 className="font-semibold text-neutral-900">{title}</h3>- <p className="text-neutral-500">{description}</p>- </div>- ))}+ {/* Feature grid */}+ <div className="mt-16 grid grid-cols-1 gap-10 sm:grid-cols-2">+ {FEATURES.map(({ icon: Icon, title, description }) => (+ <div key={title} className="flex flex-col gap-2.5 text-sm">+ <Icon className="size-4 shrink-0 text-[var(--brand)]" />+ <h3 className="font-semibold text-neutral-900">{title}</h3>+ <p className="text-neutral-500">{description}</p>+ </div>+ ))}+ </div></div></div>- </div>+ </>);}diff --git a/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/apply/success/pixel-conversion.tsx b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/apply/success/pixel-conversion.tsxnew file mode 100644index 0000000000..ab9a6d6f2f--- /dev/null+++ b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/apply/success/pixel-conversion.tsx@@ -0,0 +1,23 @@+"use client";++import { useSearchParams } from "next/navigation";+import { useEffect } from "react";++declare global {+ interface Window {+ fbq: (action: string, event: string, params?: Record<string, any>) => void;+ }+}++export function PixelConversion() {+ const searchParams = useSearchParams();+ const applicationId = searchParams.get("applicationId");++ useEffect(() => {+ if (applicationId && typeof window !== "undefined" && window.fbq) {+ window.fbq("track", "application submitted");+ }+ }, [applicationId]);++ return <></>;+}diff --git a/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/layout.tsx b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/layout.tsxindex aed938d191..9868c94437 100644--- a/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/layout.tsx+++ b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/layout.tsx@@ -7,6 +7,7 @@ import { APP_DOMAIN, PARTNERS_DOMAIN } from "@dub/utils";import { constructMetadata } from "@dub/utils/src/functions";import Link from "next/link";import { notFound } from "next/navigation";+import Script from "next/script";import { PropsWithChildren } from "react";export async function generateMetadata({@@ -60,49 +61,59 @@ export default async function ApplyLayout({}return (- <div className="relative">- <div className="relative z-10 mx-auto min-h-screen w-full max-w-screen-sm bg-white">- <div className="pointer-events-none absolute left-0 top-0 h-screen w-full border-x border-neutral-200 [mask-image:linear-gradient(black,transparent)]" />- {children}- {/* Footer */}- <footer className="mt-14 flex flex-col items-center gap-4 py-6 text-center text-xs text-neutral-500">- <Link- href="https://dub.co/partners"- target="_blank"- className="flex items-center gap-1.5 whitespace-nowrap"- >- Powered by <Wordmark className="h-4 p-0.5" />- </Link>- <span className="flex items-center gap-2">- <a- href="https://dub.co/legal/partners"- target="_blank"- className="transition-colors duration-75 hover:text-neutral-600"- >- Terms of Service- </a>- <span className="text-base text-neutral-200">•</span>- <a- href="https://dub.co/legal/privacy"+ <>+ {program.slug === "perplexity" && (+ <Script+ strategy="beforeInteractive"+ dangerouslySetInnerHTML={{+ __html: `!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','https://connect.facebook.net/en_US/fbevents.js');fbq('init', '1340891577378510');fbq('track', 'PageView');`,+ }}+ />+ )}+ <div className="relative">+ <div className="relative z-10 mx-auto min-h-screen w-full max-w-screen-sm bg-white">+ <div className="pointer-events-none absolute left-0 top-0 h-screen w-full border-x border-neutral-200 [mask-image:linear-gradient(black,transparent)]" />+ {children}+ {/* Footer */}+ <footer className="mt-14 flex flex-col items-center gap-4 py-6 text-center text-xs text-neutral-500">+ <Link+ href="https://dub.co/partners"target="_blank"- className="transition-colors duration-75 hover:text-neutral-600"+ className="flex items-center gap-1.5 whitespace-nowrap">- Privacy Policy- </a>- </span>- </footer>- </div>+ Powered by <Wordmark className="h-4 p-0.5" />+ </Link>+ <span className="flex items-center gap-2">+ <a+ href="https://dub.co/legal/partners"+ target="_blank"+ className="transition-colors duration-75 hover:text-neutral-600"+ >+ Terms of Service+ </a>+ <span className="text-base text-neutral-200">•</span>+ <a+ href="https://dub.co/legal/privacy"+ target="_blank"+ className="transition-colors duration-75 hover:text-neutral-600"+ >+ Privacy Policy+ </a>+ </span>+ </footer>+ </div>- {/* Background grid */}- <div className="absolute inset-0 flex h-fit w-full items-center justify-center">- <img- src="https://assets.dub.co/misc/program-apply-grid.svg"- alt=""- width={1280}- height={480}- className="[mask-image:radial-gradient(70%_100%_at_50%_0%,black_30%,transparent)]"- />+ {/* Background grid */}+ <div className="absolute inset-0 flex h-fit w-full items-center justify-center">+ <img+ src="https://assets.dub.co/misc/program-apply-grid.svg"+ alt=""+ width={1280}+ height={480}+ className="[mask-image:radial-gradient(70%_100%_at_50%_0%,black_30%,transparent)]"+ />+ </div></div>- </div>+ </>);}