Add new contact form#9715
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new “Contact Us” flow for the website by adding a dedicated contact form page, updating CTAs to route to that page (instead of mailto: links), and adding site-wide click/content-group analytics tracking.
Changes:
- Added contact-subject typing (
CONTACT_SUBJECTS/ContactSubject) and a newContactFormclient component that submits to the forms API. - Replaced various “Contact Sales / Book a Demo”
mailto:CTAs with links to/services/support/contact(optionally preselecting a subject via query string). - Added global analytics helpers (
content_group+ click tracking viadata-track) and threaded tracking props through CTA components.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| website/src/types/support.ts | Adds typed contact-subject constants/types used by the new contact form and URL param validation. |
| website/src/page-components/services/support/contact.tsx | Replaces the old support contact layout with the new ContactForm-based “Contact Us” page and subject-from-URL behavior. |
| website/src/page-components/pricing.tsx | Routes “Contact Sales” CTAs to the new contact page and adds click tracking IDs. |
| website/src/page-components/platform/continuous-integration.tsx | Updates demo CTA to point to the new contact page and adds tracking. |
| website/src/page-components/platform/analytics.tsx | Updates demo/launch CTAs and adds tracking. |
| website/src/page-components/index.tsx | Adds tracking to “Get Started” and updates demo/launch CTAs to use the new contact page. |
| website/src/components/misc/plan.tsx | Adds optional ctaTrack and passes it through as a data-track attribute. |
| website/src/components/misc/next-steps-content-section.tsx | Adds optional tracking props and applies them via data-track attributes on CTA links. |
| website/src/components/misc/index.ts | Re-exports the new ContactForm. |
| website/src/components/misc/contact-form.tsx | Introduces the new client-side contact form UI, validation, submission, and submit tracking. |
| website/src/components/layout/site/header.tsx | Updates header CTAs to “Contact Us” and adds tracking attributes. |
| website/lib/providers.tsx | Mounts the new analytics components globally. |
| website/lib/analytics.tsx | Adds content-group setting and global click tracking based on data-track. |
| website/app/services/support/contact/page.tsx | Simplifies the app route page to render the new contact page without recent-posts data. |
Comments suppressed due to low confidence (1)
website/src/components/misc/contact-form.tsx:95
- The submission payload uses the
SupportFormendpoint and sendsSupportPlan: formData.subject. This is confusing in-code (a "subject" being serialized as "SupportPlan") and makes it easy to integrate the wrong field/value set. Consider aligning naming (e.g.,subject->supportPlanif intentionally reusing the support form contract, or update the payload field/endpoint to match a contact-subject contract).
const response = await fetch(
"https://forms.chillicream.com/api/SupportForm",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
Name: formData.name,
Email: formData.email,
Company: formData.company,
SupportPlan: formData.subject,
Message: formData.message,
}),
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+81
to
+83
| <LinkButton to={ctaLink} data-track={ctaTrack}> | ||
| {ctaText} | ||
| </LinkButton> |
Comment on lines
+42
to
47
| <LinkButton to={primaryLink} data-track={primaryTrack}> | ||
| {primaryLinkText} | ||
| </LinkButton> | ||
| {secondaryLink && secondaryLinkText && ( | ||
| <LinkTextButton to={secondaryLink}> | ||
| <LinkTextButton to={secondaryLink} data-track={secondaryTrack}> | ||
| {secondaryLinkText} |
Comment on lines
+61
to
+63
| <HeroLink to="/docs/nitro/apis/fusion" data-track="get_started_click"> | ||
| Get Started | ||
| </HeroLink> |
Comment on lines
923
to
+930
| <RequestDemoLink | ||
| to="mailto:contact@chillicream.com?subject=Demo" | ||
| prefetch={false} | ||
| to="/services/support/contact" | ||
| data-track="contact_us_click" | ||
| > | ||
| Request a Demo | ||
| Contact Us | ||
| </RequestDemoLink> | ||
| <LaunchLink to={tools.nitro}>Launch</LaunchLink> | ||
| <LaunchLink to={tools.nitro} data-track="launch_click"> | ||
| Launch |
Comment on lines
+44
to
+46
| (field: keyof ContactFormData, value: string) => { | ||
| setFormData((prev) => ({ ...prev, [field]: value })); | ||
| if (errors[field as keyof ContactFormErrors]) { |
Comment on lines
+57
to
+62
| const el = (e.target as HTMLElement).closest<HTMLElement>("[data-track]"); | ||
| if (!el || !window.gtag) { | ||
| return; | ||
| } | ||
|
|
||
| window.gtag("event", el.dataset.track, { |
This was referenced May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.