Skip to content

Commit 7f8cc65

Browse files
authored
Added a new AWS Activate offer page (supabase#44957)
## 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? Added a new go page for AWS Activate offers. Needed to embed a HubSpot form directly as it has conditional formatting, which is not supported on the go pages natively. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * New AWS Activate Offer landing page added to the platform * Integrated form system for capturing user information in the offer flow <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent cacee25 commit 7f8cc65

3 files changed

Lines changed: 215 additions & 0 deletions

File tree

apps/www/_go/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import stripeExecDinnerThankYou from './events/stripe-sessions-2026/exec-dinner-
1616
import stripeMeetingScheduler from './events/stripe-sessions-2026/meeting-scheduler'
1717
import stripeParty from './events/stripe-sessions-2026/party'
1818
import sxswContest from './events/sxsw-2026/contest'
19+
import awsActivateOffer from './lead-gen/aws-activate-offer'
1920
import exampleLeadGen from './lead-gen/example-lead-gen'
2021
import amoe from './legal/amoe'
2122
import amoeThankYou from './legal/amoe-thankyou'
@@ -29,6 +30,7 @@ import figmaWebinarMay2026ThankYou from './webinar/figma-webinar-may2026-thankyo
2930
import promptToProdSentry from './webinar/prompt-to-prod-sentry'
3031

3132
const pages: GoPageInput[] = [
33+
awsActivateOffer,
3234
exampleLeadGen,
3335
byocEarlyAccess,
3436
amoe,
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
import type { GoPageInput } from 'marketing'
2+
3+
import HubSpotFormEmbed from './components/HubSpotFormEmbed'
4+
5+
const page: GoPageInput = {
6+
template: 'lead-gen',
7+
slug: 'aws-activate-offer',
8+
metadata: {
9+
title: 'Get $300 in Supabase credits through AWS Activate',
10+
description:
11+
'Exclusively for VC-backed startups accessing Supabase through AWS Activate. Apply to receive $300 in Supabase credits.',
12+
noIndex: true,
13+
},
14+
hero: {
15+
title: 'Get $300 in Supabase credits through AWS Activate',
16+
description:
17+
'This offer is exclusively for VC-backed startups accessing Supabase through AWS Activate. Complete the form below to apply.',
18+
image: {
19+
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',
20+
alt: 'Supabase and AWS Activate: $300 in credits for eligible startups',
21+
width: 600,
22+
height: 315,
23+
},
24+
ctas: [
25+
{
26+
label: 'Apply for your credits',
27+
href: '#form',
28+
variant: 'primary',
29+
},
30+
],
31+
},
32+
sections: [
33+
{
34+
type: 'single-column',
35+
title: 'About the offer',
36+
description:
37+
'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.',
38+
},
39+
{
40+
type: 'feature-grid',
41+
title: 'What the credits unlock',
42+
description: 'An all-in-one suite built on Postgres. Use one or all.',
43+
columns: 3,
44+
items: [
45+
{
46+
title: 'Database',
47+
description: 'A full Postgres instance hosted in the cloud.',
48+
},
49+
{
50+
title: 'Auth',
51+
description:
52+
'A complete user management system with email, social, and passwordless login.',
53+
},
54+
{
55+
title: 'Storage',
56+
description: 'Upload and serve files of any size.',
57+
},
58+
{
59+
title: 'Edge Functions',
60+
description: 'Server-side TypeScript functions, distributed globally at the edge.',
61+
},
62+
{
63+
title: 'Realtime',
64+
description: 'Live sync for collaborative applications, powered by Postgres replication.',
65+
},
66+
{
67+
title: 'Vector',
68+
description: 'pgvector for fast semantic search and embedding storage.',
69+
},
70+
],
71+
},
72+
{
73+
type: 'steps',
74+
title: 'Eligibility requirements',
75+
description: 'To qualify for this offer you must:',
76+
items: [
77+
{ title: 'Be a VC-backed startup with less than $5M in total funding' },
78+
{ title: 'Have an active AWS account' },
79+
{ title: 'Not have previously redeemed this offer' },
80+
],
81+
},
82+
{
83+
type: 'faq',
84+
title: 'Frequently asked questions',
85+
items: [
86+
{
87+
question: 'Who is this offer for?',
88+
answer:
89+
'VC-backed startups with less than $5M in total funding and an active AWS account.',
90+
},
91+
{
92+
question: 'What can I use the credits for?',
93+
answer:
94+
'Credits apply to any Supabase product including database, auth, storage, and edge functions.',
95+
},
96+
{
97+
question: 'How long does it take to hear back?',
98+
answer:
99+
"We review applications within 5 business days. You'll receive a confirmation email once submitted.",
100+
},
101+
{
102+
question: 'What happens after I apply?',
103+
answer:
104+
'If your application is approved, a member of our team will reach out to activate your credits.',
105+
},
106+
],
107+
},
108+
{
109+
type: 'single-column',
110+
id: 'form',
111+
title: 'Apply for your credits',
112+
children: (
113+
<div className="mx-auto w-full max-w-2xl border border-muted rounded-2xl p-6 sm:p-8">
114+
<HubSpotFormEmbed portalId="19953346" formId="db2718f8-1f23-4fe1-aaab-b4924dc4ca54" />
115+
</div>
116+
),
117+
},
118+
],
119+
}
120+
121+
export default page
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
'use client'
2+
3+
import { useEffect, useId } from 'react'
4+
5+
declare global {
6+
interface Window {
7+
hbspt?: {
8+
forms: {
9+
create: (config: { portalId: string; formId: string; target: string }) => void
10+
}
11+
}
12+
}
13+
}
14+
15+
const HUBSPOT_SCRIPT_SRC = 'https://js.hsforms.net/forms/embed/v2.js'
16+
17+
function loadHubSpotScript(): Promise<void> {
18+
return new Promise((resolve, reject) => {
19+
if (window.hbspt) {
20+
resolve()
21+
return
22+
}
23+
24+
const existing = document.querySelector<HTMLScriptElement>(
25+
`script[src="${HUBSPOT_SCRIPT_SRC}"]`
26+
)
27+
if (existing) {
28+
existing.addEventListener('load', () => resolve(), { once: true })
29+
existing.addEventListener(
30+
'error',
31+
() => reject(new Error('Failed to load HubSpot form script')),
32+
{
33+
once: true,
34+
}
35+
)
36+
return
37+
}
38+
39+
const script = document.createElement('script')
40+
script.src = HUBSPOT_SCRIPT_SRC
41+
script.async = true
42+
script.defer = true
43+
script.onload = () => resolve()
44+
script.onerror = () => reject(new Error('Failed to load HubSpot form script'))
45+
document.body.appendChild(script)
46+
})
47+
}
48+
49+
export default function HubSpotFormEmbed({
50+
portalId,
51+
formId,
52+
}: {
53+
portalId: string
54+
formId: string
55+
}) {
56+
const targetId = `hubspot-form-${useId().replace(/:/g, '-')}`
57+
58+
useEffect(() => {
59+
let cancelled = false
60+
61+
const mountForm = async () => {
62+
try {
63+
await loadHubSpotScript()
64+
if (cancelled || !window.hbspt) return
65+
66+
const target = document.getElementById(targetId)
67+
if (!target) return
68+
69+
// Reset target to avoid duplicate forms on remounts.
70+
while (target.firstChild) {
71+
target.removeChild(target.firstChild)
72+
}
73+
74+
window.hbspt.forms.create({
75+
portalId,
76+
formId,
77+
target: `#${targetId}`,
78+
})
79+
} catch (error) {
80+
console.error('[go/hubspot] Failed to initialize HubSpot form embed', error)
81+
}
82+
}
83+
84+
mountForm()
85+
86+
return () => {
87+
cancelled = true
88+
}
89+
}, [formId, portalId, targetId])
90+
91+
return <div id={targetId} />
92+
}

0 commit comments

Comments
 (0)