diff --git a/apps/dashboard/src/@/analytics/report.ts b/apps/dashboard/src/@/analytics/report.ts index 0712427ff9b..ee807b9ec54 100644 --- a/apps/dashboard/src/@/analytics/report.ts +++ b/apps/dashboard/src/@/analytics/report.ts @@ -691,3 +691,17 @@ export function reportProductFeedback(properties: { source: properties.source, }); } + +/** + * ### Why do we need to report this event? + * - To track conversions for the bridge page links + * + * ### Who is responsible for this event? + * @MananTank + * + */ +export function reportBridgePageLinkClick(params: { + linkType: "integrate-bridge" | "trending-tokens"; +}) { + posthog.capture("bridge page link clicked", params); +} diff --git a/apps/dashboard/src/@/components/DarkVeil.tsx b/apps/dashboard/src/@/components/DarkVeil.tsx index e3fde0d79aa..caa6c98d1ce 100644 --- a/apps/dashboard/src/@/components/DarkVeil.tsx +++ b/apps/dashboard/src/@/components/DarkVeil.tsx @@ -188,5 +188,5 @@ export function DarkVeil({ backgroundOpacity, patternLightness, ]); - return ; + return ; } diff --git a/apps/dashboard/src/@/components/blocks/faq-section.tsx b/apps/dashboard/src/@/components/blocks/faq-section.tsx index bbef1d4f1aa..9fd1fb6fc24 100644 --- a/apps/dashboard/src/@/components/blocks/faq-section.tsx +++ b/apps/dashboard/src/@/components/blocks/faq-section.tsx @@ -9,23 +9,21 @@ export function FaqSection(props: { faqs: Array<{ title: string; description: string }>; }) { return ( -
-
-

- Frequently asked questions -

-
- {props.faqs.map((faq, faqIndex) => ( - - ))} -
-
-
+
+

+ Frequently asked questions +

+
+ {props.faqs.map((faq, faqIndex) => ( + + ))} +
+
); } diff --git a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx index 4c492c32c9f..3ba73e13dd2 100644 --- a/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx +++ b/apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/(chainPage)/page.tsx @@ -67,7 +67,9 @@ export default async function Page(props: Props) { )} {chainSeo?.faqs && chainSeo.faqs.length > 0 && ( - +
+ +
)} ); diff --git a/apps/dashboard/src/app/bridge/components/client/pill-link.tsx b/apps/dashboard/src/app/bridge/components/client/pill-link.tsx new file mode 100644 index 00000000000..111fa6e8a28 --- /dev/null +++ b/apps/dashboard/src/app/bridge/components/client/pill-link.tsx @@ -0,0 +1,33 @@ +"use client"; +import { ChevronRightIcon, DollarSignIcon, TrendingUpIcon } from "lucide-react"; +import Link from "next/link"; +import { reportBridgePageLinkClick } from "@/analytics/report"; +import { cn } from "@/lib/utils"; + +export function PillLink(props: { + children: React.ReactNode; + href: string; + linkType: "integrate-bridge" | "trending-tokens"; +}) { + const Icon = + props.linkType === "integrate-bridge" ? DollarSignIcon : TrendingUpIcon; + return ( + reportBridgePageLinkClick({ linkType: props.linkType })} + className={cn( + "shadow-sm text-center justify-center inline-flex items-center gap-4 text-foreground group", + "text-sm bg-card/50 backdrop-blur-lg border border-border/70", + "rounded-full px-4 py-2.5 transition-colors duration-300 text-pretty leading-5", + "hover:bg-pink-300/20 dark:hover:bg-pink-950/30 hover:text-foreground hover:border-pink-400 dark:hover:border-pink-800", + )} + > +
+ + {props.children} +
+ + + ); +} diff --git a/apps/dashboard/src/app/bridge/page.tsx b/apps/dashboard/src/app/bridge/page.tsx index 660541cc24d..cac02859019 100644 --- a/apps/dashboard/src/app/bridge/page.tsx +++ b/apps/dashboard/src/app/bridge/page.tsx @@ -1,7 +1,5 @@ import { cn } from "@workspace/ui/lib/utils"; -import { ChevronRightIcon } from "lucide-react"; import type { Metadata } from "next"; -import Link from "next/link"; import type { Address } from "thirdweb"; import { defineChain } from "thirdweb/chains"; import { getContract } from "thirdweb/contract"; @@ -9,6 +7,7 @@ import { getCurrencyMetadata } from "thirdweb/extensions/erc20"; import { FaqSection } from "@/components/blocks/faq-section"; import { AppFooter } from "@/components/footers/app-footer"; import { BridgeVeil } from "./components/BridgeVeil"; +import { PillLink } from "./components/client/pill-link"; import { UniversalBridgeEmbed } from "./components/client/UniversalBridgeEmbed"; import { PageHeader } from "./components/header"; import { bridgeAppThirdwebClient } from "./constants"; @@ -56,15 +55,17 @@ export default async function BridgePage({ return (
-
+
-
-
+
+ +
+

Bridge and Swap tokens
across any chain, instantly @@ -77,6 +78,8 @@ export default async function BridgePage({

+
+
-
- -
+
-
- +
+ Integrate Bridge in your apps in minutes, and start generating revenue - + Discover Trending Tokens
+
+ +
+ +
+ +
+
@@ -120,30 +135,17 @@ export default async function BridgePage({ function DataPill(props: { children: React.ReactNode }) { return ( -

+

{props.children}

); } -function PillLink(props: { children: React.ReactNode; href: string }) { - return ( - - {props.children} - - - ); -} - function DotsBackgroundPattern(props: { className?: string }) { return (