Skip to content

Commit

Permalink
feat: Google Tag
Browse files Browse the repository at this point in the history
  • Loading branch information
carhartlewis committed Feb 21, 2025
1 parent cccd666 commit 9124cfc
Show file tree
Hide file tree
Showing 7 changed files with 1,051 additions and 919 deletions.
35 changes: 35 additions & 0 deletions apps/web/src/app/(home)/success/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import Logo from "@/app/components/logo";
import { env } from "@/env.mjs";
import Link from "next/link";
import Balancer from "react-wrap-balancer";

export default function SuccessPage() {
return (
<>
<section className="w- full">
<div className="container mx-auto px-4 py-16 md:py-24">
<div className="flex flex-col items-center space-y-6">
<Logo />
<h1 className="max-w-[900px] text-4xl font-semibold leading-tight tracking-tighter lg:leading-[1.1] mx-auto">
<Balancer>Thank you 🎉</Balancer>
</h1>
<p className="text-lg md:text-xl font-light text-muted-foreground mt-6 mx-auto max-w-[800px]">
<Balancer>
We'll be in touch when we're close to launching. In the
meantime, join us on the community{" "}
<Link
href="https://discord.gg/compai"
className="underline underline-offset-4"
target="_blank"
>
Discord
</Link>{" "}
to learn more about the project and to get involved!
</Balancer>
</p>
</div>
</div>
</section>
</>
);
}
2 changes: 0 additions & 2 deletions apps/web/src/app/actions/waitlist.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
"use server";

import type { introductionEmailTask } from "@/jobs/introduction";
import * as ServerAnalytics from "@bubba/analytics/src/server";
import { resend } from "@bubba/email/lib/resend";
import { tasks } from "@trigger.dev/sdk/v3";
import ky from "ky";
import { createSafeActionClient } from "next-safe-action";
import { waitlistSchema } from "./schema";
Expand Down
3 changes: 3 additions & 0 deletions apps/web/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { Geist } from "next/font/google";
import { Toaster } from "sonner";
import "@bubba/ui/globals.css";
import { Providers } from "@/app/providers";
import { env } from "@/env.mjs";
import { cn } from "@/lib/utils";
import { GoogleTagManager } from "@next/third-parties/google";

const geistSans = Geist({
variable: "--font-geist-sans",
Expand All @@ -27,6 +29,7 @@ export default function RootLayout({
}) {
return (
<html lang="en" suppressHydrationWarning>
<GoogleTagManager gtmId={env.NEXT_PUBLIC_GOOGLE_TAG_ID!} />
<body
className={cn(
"bg-background font-sans antialiased",
Expand Down
19 changes: 0 additions & 19 deletions apps/web/src/app/success/page.tsx

This file was deleted.

3 changes: 3 additions & 0 deletions apps/web/src/env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const env = createEnv({
NEXT_PUBLIC_GOOGLE_TAG_ID: z.string().optional(),
NEXT_PUBLIC_POSTHOG_KEY: z.string().optional(),
NEXT_PUBLIC_POSTHOG_HOST: z.string().optional(),
NEXT_PUBLIC_GOOGLE_AD_CONVERSION: z.string().optional(),
},

runtimeEnv: {
Expand All @@ -21,6 +22,8 @@ export const env = createEnv({
NEXT_PUBLIC_GOOGLE_TAG_ID: process.env.NEXT_PUBLIC_GOOGLE_TAG_ID,
NEXT_PUBLIC_POSTHOG_KEY: process.env.NEXT_PUBLIC_POSTHOG_KEY,
NEXT_PUBLIC_POSTHOG_HOST: process.env.NEXT_PUBLIC_POSTHOG_HOST,
NEXT_PUBLIC_GOOGLE_AD_CONVERSION:
process.env.NEXT_PUBLIC_GOOGLE_AD_CONVERSION,
},

skipValidation: !!process.env.CI || !!process.env.SKIP_ENV_VALIDATION,
Expand Down
Loading

0 comments on commit 9124cfc

Please sign in to comment.