mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Problem Low conversion rate for high SEO traffic pages (`/database`, `/features/sql-editor`, etc). ## Solution - For product pages, changing the button variant for `Start your project` to be `primary`, more visually eye-catching. This is the primary human CTA for the page, so should stand out more. - For `feature` pages, adding a manually specified line delimiter where we can inject a CTA button. Again, these are the primary purpose of the page for human readers, `hey, go try out this thing`, so we should optimize for this a bit more. We'd likely want to take a different approach if we apply this to _all_ feature pages, but this seems fine for an initial test here. Also, while I was in here, added a bunch of empty `blogURL` values for feature pages. ## Preview links ### product pages https://zone-www-dot-com-git-kody-devrel-822-sql-editor-8236e1-supabase.vercel.app/database <img width="1219" height="541" alt="Image" src="https://github.com/user-attachments/assets/67708db7-615f-4bba-aeeb-8647222ea2f3" /> ### feature pages https://zone-www-dot-com-git-kody-devrel-822-sql-editor-8236e1-supabase.vercel.app/features/sql-editor <img width="1219" height="968" alt="Image" src="https://github.com/user-attachments/assets/bbf69d91-0316-47c8-a279-a5d41131f830" />
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
'use client'
|
|
|
|
import { useSendTelemetryEvent } from '~/lib/telemetry'
|
|
import { useIsLoggedIn } from 'common'
|
|
import Link from 'next/link'
|
|
import type { ComponentProps } from 'react'
|
|
import { Button } from 'ui'
|
|
|
|
import { getDashboardCtaHref } from '@/lib/dashboard-links'
|
|
|
|
type StartYourProjectButtonProps = {
|
|
children?: React.ReactNode
|
|
onClick?: ComponentProps<typeof Link>['onClick']
|
|
buttonLocation?: string
|
|
size?: ComponentProps<typeof Button>['size']
|
|
variant?: ComponentProps<typeof Button>['variant']
|
|
className?: string
|
|
}
|
|
|
|
export function StartYourProjectButton({
|
|
children = 'Start your project',
|
|
onClick,
|
|
buttonLocation = 'no location set',
|
|
size = 'medium',
|
|
variant,
|
|
className,
|
|
}: StartYourProjectButtonProps) {
|
|
const isLoggedIn = useIsLoggedIn()
|
|
const sendTelemetryEvent = useSendTelemetryEvent()
|
|
|
|
return (
|
|
<Button asChild size={size} variant={variant} className={className}>
|
|
<a
|
|
href={getDashboardCtaHref(isLoggedIn)}
|
|
onClick={(event) => {
|
|
onClick?.(event)
|
|
sendTelemetryEvent({
|
|
action: 'start_project_button_clicked',
|
|
properties: { buttonLocation },
|
|
})
|
|
}}
|
|
>
|
|
{children}
|
|
</a>
|
|
</Button>
|
|
)
|
|
}
|