Files
supabase/apps/www/_go/lead-gen/aws-activate-offer.tsx
Alan Daniel 701f1602c6 feat(marketing): reusable MarketingForm with HubSpot/Customer.io/Notion fan-out (#45605)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Refactor + feature

## What is the current behavior?

The AWS Activate offer page used a one-off `HubSpotFormEmbed` component
(an iframe-style HubSpot script embed) living under
`apps/www/_go/lead-gen/components/`. It was single-destination (HubSpot
only) and not reusable. Closes
[DEBR-266](https://linear.app/supabase/issue/DEBR-266).

## What is the new behavior?

Adds a reusable `MarketingForm` component to the `marketing` package
that fans out submissions to HubSpot, Customer.io, and Notion in
parallel via the existing `submitFormAction` server action. The go-page
`FormSection` is now a thin adapter on top of `MarketingForm`, and
`aws-activate-offer.tsx` uses `MarketingForm` directly. The legacy
`HubSpotFormEmbed` is deleted.

## Additional context

- `MarketingForm` is exported from `marketing` so it can be used outside
go pages.
- Customer.io / Notion fan-out for AWS Activate is wired but not yet
configured — drop in `crm.customerio` / `crm.notion` blocks once
[DEBR-265](https://linear.app/supabase/issue/DEBR-265) lands.
- The original HubSpot embed had conditional field formatting which the
new form does not replicate; verify HubSpot field internal names
(`firstname`, `lastname`, `email`, `company`, `aws_account_id`) match
the target form before merging.
- Requires `HUBSPOT_PORTAL_ID` env to point at portal `19953346` (was
previously hardcoded in the embed).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* New reusable marketing form with responsive two-column layout,
validation, error display, success UI or redirect, optional
title/description and markdown disclaimer.
* Added URL and checkbox field types plus conditional field visibility.
* HubSpot embed accepts typed props and improves script loading with
retry and clearer error logging.

* **Refactor**
* Forms consolidated into a shared marketing module; form sections now
delegate to the shared form component.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-07 20:37:24 -04:00

121 lines
4.0 KiB
TypeScript

import { HubSpotFormEmbed } from 'marketing'
import type { GoPageInput } from 'marketing'
const page: GoPageInput = {
template: 'lead-gen',
slug: 'aws-activate-offer',
metadata: {
title: 'Get $300 in Supabase credits through AWS Activate',
description:
'Exclusively for VC-backed startups accessing Supabase through AWS Activate. Apply to receive $300 in Supabase credits.',
noIndex: true,
},
hero: {
title: 'Get $300 in Supabase credits through AWS Activate',
description:
'This offer is exclusively for VC-backed startups accessing Supabase through AWS Activate. Complete the form below to apply.',
image: {
src: 'https://zhfonblqamxferhoguzj.supabase.co/functions/v1/generate-og?template=partnerships&layout=icon-only&copy=%5B%24300%5D+in+credits+for%0AAWS+Activate+startups&icon=supabase.svg&icon2=aws.svg',
alt: 'Supabase and AWS Activate: $300 in credits for eligible startups',
width: 600,
height: 315,
},
ctas: [
{
label: 'Apply for your credits',
href: '#form',
variant: 'primary',
},
],
},
sections: [
{
type: 'single-column',
title: 'About the offer',
description:
'Supabase is the easy-to-use, open-source managed Postgres with integrated backend services. With this exclusive AWS Activate offer, eligible startups receive $300 in Supabase credits to build, scale, and ship faster.',
},
{
type: 'feature-grid',
title: 'What the credits unlock',
description: 'An all-in-one suite built on Postgres. Use one or all.',
columns: 3,
items: [
{
title: 'Database',
description: 'A full Postgres instance hosted in the cloud.',
},
{
title: 'Auth',
description:
'A complete user management system with email, social, and passwordless login.',
},
{
title: 'Storage',
description: 'Upload and serve files of any size.',
},
{
title: 'Edge Functions',
description: 'Server-side TypeScript functions, distributed globally at the edge.',
},
{
title: 'Realtime',
description: 'Live sync for collaborative applications, powered by Postgres replication.',
},
{
title: 'Vector',
description: 'pgvector for fast semantic search and embedding storage.',
},
],
},
{
type: 'steps',
title: 'Eligibility requirements',
description: 'To qualify for this offer you must:',
items: [
{ title: 'Be a VC-backed startup with less than $5M in total funding' },
{ title: 'Have an active AWS account' },
{ title: 'Not have previously redeemed this offer' },
],
},
{
type: 'faq',
title: 'Frequently asked questions',
items: [
{
question: 'Who is this offer for?',
answer:
'VC-backed startups with less than $5M in total funding and an active AWS account.',
},
{
question: 'What can I use the credits for?',
answer:
'Credits apply to any Supabase product including database, auth, storage, and edge functions.',
},
{
question: 'How long does it take to hear back?',
answer:
"We review applications within 5 business days. You'll receive a confirmation email once submitted.",
},
{
question: 'What happens after I apply?',
answer:
'If your application is approved, a member of our team will reach out to activate your credits.',
},
],
},
{
type: 'single-column',
id: 'form',
title: 'Apply for your credits',
children: (
<div className="mx-auto w-full max-w-2xl border border-muted rounded-2xl overflow-hidden">
<HubSpotFormEmbed portalId="19953346" formId="db2718f8-1f23-4fe1-aaab-b4924dc4ca54" />
</div>
),
},
],
}
export default page