Skip to content

Commit f89e96e

Browse files
waleedlatif1claude
andcommitted
fix(landing): add click tracking to integration page CTAs
Create IntegrationCtaButton client component that wraps AuthModal and fires trackLandingCta on click, matching the pattern used by every other landing section CTA. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 119b6c0 commit f89e96e

File tree

2 files changed

+39
-17
lines changed

2 files changed

+39
-17
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
'use client'
2+
3+
import { AuthModal } from '@/app/(landing)/components/auth-modal/auth-modal'
4+
import { trackLandingCta } from '@/app/(landing)/landing-analytics'
5+
6+
interface IntegrationCtaButtonProps {
7+
children: React.ReactNode
8+
className?: string
9+
label: string
10+
}
11+
12+
export function IntegrationCtaButton({ children, className, label }: IntegrationCtaButtonProps) {
13+
return (
14+
<AuthModal defaultView='signup' source='integrations'>
15+
<button
16+
type='button'
17+
className={className}
18+
onClick={() =>
19+
trackLandingCta({ label, section: 'integrations', destination: 'auth_modal' })
20+
}
21+
>
22+
{children}
23+
</button>
24+
</AuthModal>
25+
)
26+
}

apps/sim/app/(landing)/integrations/[slug]/page.tsx

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Image from 'next/image'
33
import Link from 'next/link'
44
import { notFound } from 'next/navigation'
55
import { getBaseUrl } from '@/lib/core/utils/urls'
6-
import { AuthModal } from '@/app/(landing)/components/auth-modal/auth-modal'
6+
import { IntegrationCtaButton } from '@/app/(landing)/integrations/[slug]/components/integration-cta-button'
77
import { IntegrationFAQ } from '@/app/(landing)/integrations/[slug]/components/integration-faq'
88
import { TemplateCardButton } from '@/app/(landing)/integrations/[slug]/components/template-card-button'
99
import { IntegrationIcon } from '@/app/(landing)/integrations/components/integration-icon'
@@ -367,14 +367,12 @@ export default async function IntegrationPage({ params }: { params: Promise<{ sl
367367

368368
{/* CTAs */}
369369
<div className='flex flex-wrap gap-2'>
370-
<AuthModal defaultView='signup' source='integrations'>
371-
<button
372-
type='button'
373-
className='inline-flex h-[32px] items-center gap-2 rounded-[5px] border border-white bg-white px-2.5 font-season text-black text-sm transition-colors hover:border-[#E0E0E0] hover:bg-[#E0E0E0]'
374-
>
375-
Start building free
376-
</button>
377-
</AuthModal>
370+
<IntegrationCtaButton
371+
label='Start building free'
372+
className='inline-flex h-[32px] items-center gap-2 rounded-[5px] border border-white bg-white px-2.5 font-season text-black text-sm transition-colors hover:border-[#E0E0E0] hover:bg-[#E0E0E0]'
373+
>
374+
Start building free
375+
</IntegrationCtaButton>
378376
<a
379377
href={docsUrl}
380378
target='_blank'
@@ -781,14 +779,12 @@ export default async function IntegrationPage({ params }: { params: Promise<{ sl
781779
Build your first AI agent with {name} in minutes. Connect to every tool your team uses.
782780
Free to start — no credit card required.
783781
</p>
784-
<AuthModal defaultView='signup' source='integrations'>
785-
<button
786-
type='button'
787-
className='inline-flex h-[32px] items-center gap-2 rounded-[5px] border border-white bg-white px-2.5 font-season text-black text-sm transition-colors hover:border-[#E0E0E0] hover:bg-[#E0E0E0]'
788-
>
789-
Build for free
790-
</button>
791-
</AuthModal>
782+
<IntegrationCtaButton
783+
label='Build for free'
784+
className='inline-flex h-[32px] items-center gap-2 rounded-[5px] border border-white bg-white px-2.5 font-season text-black text-sm transition-colors hover:border-[#E0E0E0] hover:bg-[#E0E0E0]'
785+
>
786+
Build for free
787+
</IntegrationCtaButton>
792788
</section>
793789
</div>
794790

0 commit comments

Comments
 (0)