Skip to content

Add new contact form#9715

Merged
michaelstaib merged 10 commits into
mainfrom
mst/analytics-3
May 16, 2026
Merged

Add new contact form#9715
michaelstaib merged 10 commits into
mainfrom
mst/analytics-3

Conversation

@michaelstaib
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 16, 2026 15:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 new ContactForm client 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 via data-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 SupportForm endpoint and sends SupportPlan: 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 -> supportPlan if 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 thread website/lib/analytics.tsx Outdated
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, {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants