diff --git a/app/audit/components/ActionDock.tsx b/app/audit/components/ActionDock.tsx
index 6b40ab7c0..a2a5c73df 100644
--- a/app/audit/components/ActionDock.tsx
+++ b/app/audit/components/ActionDock.tsx
@@ -3,7 +3,7 @@
import { useEffect, useState } from 'react';
import { cn } from '@/utils/styles';
import { formatDateShort, formatUsd, formatUsdShort, type RfpView } from '../data/rfp';
-import { AddToPoolButton, SubmitProposalButton } from './Actions';
+import { AddToPoolButton, HowToApplyLink, SubmitProposalButton } from './Actions';
import { BackerFaces, PoolBar } from './Pool';
/**
@@ -52,6 +52,7 @@ export function ActionDock({ rfp }: { rfp: RfpView }) {
diff --git a/app/audit/components/Actions.tsx b/app/audit/components/Actions.tsx
index 30151f75f..0c60b8dc7 100644
--- a/app/audit/components/Actions.tsx
+++ b/app/audit/components/Actions.tsx
@@ -1,9 +1,11 @@
'use client';
import { useContext } from 'react';
-import { ArrowRight, Plus } from 'lucide-react';
+import { ArrowDown, ArrowRight, Plus } from 'lucide-react';
+import AnalyticsService, { LogEvent } from '@/services/analytics.service';
import { OrchActionsContext } from '@/app/consciousness/components/OrchActions';
import { cn } from '@/utils/styles';
+import { HOW_TO_APPLY_ID } from '../data/content';
/**
* The page's two buttons, in its own style. The actions are the RFP landing
@@ -67,3 +69,34 @@ export function SubmitProposalButton({
);
}
+
+/**
+ * A quiet link to the FAQ's "How do I apply?", which it opens and scrolls
+ * to. `placement` says where on the page it was clicked, for the funnel.
+ */
+export function HowToApplyLink({
+ placement,
+ className,
+}: {
+ placement: 'hero' | 'dock';
+ className?: string;
+}) {
+ const open = () => {
+ AnalyticsService.logEvent(LogEvent.RFP_HOW_TO_APPLY_CLICKED, { page: 'audit', placement });
+ const entry = document.getElementById(HOW_TO_APPLY_ID);
+ if (entry instanceof HTMLDetailsElement) entry.open = true;
+ };
+ return (
+
+ See how to apply
+
+
+ );
+}
diff --git a/app/audit/components/AuditRfpActions.tsx b/app/audit/components/AuditRfpActions.tsx
index 3f8a5b315..afb4b4755 100644
--- a/app/audit/components/AuditRfpActions.tsx
+++ b/app/audit/components/AuditRfpActions.tsx
@@ -7,9 +7,12 @@ import { ContributeToFundraiseModal } from '@/components/modals/ContributeToFund
import { WorkCoverCard } from '@/components/work/WorkCoverCard';
import { isAwardMechanism } from '@/components/Funding/lib/fundingMechanism';
import { handOffRfp } from '@/components/AIMode/rfpHandoff';
+import AnalyticsService, { LogEvent } from '@/services/analytics.service';
import { newDraftTarget, workspaceHref } from '@/components/AIMode/workspaceUrl';
import { isGrantActive, type FundingPool, type Grant } from '@/types/grant';
import { OrchActionsContext } from '@/app/consciousness/components/OrchActions';
+import { PROPOSAL_GUIDE } from '../data/content';
+import { CAMPAIGN, formatUsdShort } from '../data/rfp';
/**
* The page's buttons wired to the RFP, exactly as /consciousness wires its
@@ -41,29 +44,43 @@ export function AuditRfpActions({
const organization = grant.organization?.trim() || grant.createdBy?.authorProfile?.fullName || '';
const submitProposal = useCallback(() => {
+ AnalyticsService.logEvent(LogEvent.RFP_SUBMIT_PROPOSAL_CLICKED, {
+ page: 'audit',
+ grant_id: grantId,
+ open: isActive,
+ });
if (!isActive) {
toast(notOpen, { id: 'audit-action' });
return;
}
- handOffRfp({
- id: grantId,
- shortTitle: grant.shortTitle || title,
- imageUrl: imageUrl ?? '',
- fundingAmount: grant.amount.usd ?? 0,
- organization,
- applicationVisibility: grant.applicationVisibility,
- fundingMechanism: grant.fundingMechanism ?? 'FUNDING',
- });
+ handOffRfp(
+ {
+ id: grantId,
+ shortTitle: grant.shortTitle || title,
+ imageUrl: imageUrl ?? '',
+ fundingAmount: grant.amount.usd ?? 0,
+ organization,
+ applicationVisibility: grant.applicationVisibility,
+ fundingMechanism: grant.fundingMechanism ?? 'FUNDING',
+ },
+ { ...PROPOSAL_GUIDE, fundingLabel: `${formatUsdShort(CAMPAIGN.goalUsd)} goal` }
+ );
router.push(workspaceHref(newDraftTarget('need_funding', grantId)));
}, [isActive, notOpen, grant, grantId, title, imageUrl, organization, router]);
const addToPool = useCallback(() => {
- if (!isActive || pool?.status !== 'OPEN') {
- toast(isActive ? 'The pool is not taking contributions.' : notOpen, { id: 'audit-action' });
+ const open = isActive && pool?.status === 'OPEN';
+ AnalyticsService.logEvent(LogEvent.RFP_FUND_CLICKED, {
+ page: 'audit',
+ grant_id: grantId,
+ open,
+ });
+ if (!open) {
+ toast(isActive ? 'This call is not taking contributions.' : notOpen, { id: 'audit-action' });
return;
}
setIsPanelOpen(true);
- }, [isActive, pool, notOpen]);
+ }, [isActive, pool, notOpen, grantId]);
const handleContributeSuccess = useCallback(
(updatedPool?: FundingPool) => {
@@ -87,11 +104,14 @@ export function AuditRfpActions({
fundingPool={pool}
proposalTitle={title}
variant="panel"
+ headerTitle="Fund the audit"
+ successTitle={(amount) => `You put ${amount} toward the audit`}
+ successMessage="Thank you. Your contribution is in."
topContent={
}
isAward={isAwardMechanism(grant.fundingMechanism)}
- successText="Every dollar in the pool goes to the audits funded under this call."
+ successText="Every dollar goes to the audits funded under this call."
/>
)}
diff --git a/app/audit/components/Hero.tsx b/app/audit/components/Hero.tsx
index 08f19e3de..745c1ff83 100644
--- a/app/audit/components/Hero.tsx
+++ b/app/audit/components/Hero.tsx
@@ -1,7 +1,7 @@
import Link from 'next/link';
import { Logo } from '@/components/ui/Logo';
import { BackButton } from '@/app/consciousness/components/BackButton';
-import { AddToPoolButton, SubmitProposalButton } from './Actions';
+import { AddToPoolButton, HowToApplyLink, SubmitProposalButton } from './Actions';
import { HeroArt } from './HeroArt';
import { HeroCard } from './HeroCard';
import type { RfpView } from '../data/rfp';
@@ -67,6 +67,7 @@ export function Hero({ rfp }: { rfp: RfpView }) {
+