Repository navigation
Add Build the Vote volunteer pages - #110
Merged
Merged
Conversation
Election Day volunteer sign-up with CJPAC at /toronto/volunteer, with /step-2 and /thanks beneath it, rebuilt from CJPAC's preview in the site's own layout and components. The sign-up forms stay in CJPAC's Formstack account. FormstackForm embeds them, fills the partner "UTM Source" field, and hides the email opt-in and CJPAC's consent copy in favour of the consent line agreed with CJPAC, which adds Build Canada email. Step 1 redirects to step 2 with the volunteer's email in the query string. The proxy moves it into a page-scoped, short-lived httpOnly cookie and redirects to the clean URL before any HTML is served, so no analytics tag or pixel records it. Also uses the full Laurier quote on the closing bands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
React can't place a beforeInteractive <script> loose in <html>; it warned about script order and broke hydration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Step 1 now also posts the volunteer's name, email and postal code to /api/subscribe (placement build_the_vote) on a valid submit, which York Factory identifies to Customer.io, and identifies them in PostHog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Replaces the copy into York Factory's subscriber list: step 1 now posts to /api/volunteer, which identifies the volunteer to Customer.io's CDP API (keyed by email, tagged build_the_vote_volunteer), alongside the PostHog identify. Needs CUSTOMERIO_API_KEY in the deployment env. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Matches the demo's tighter vertical rhythm on phones (smaller step numbers sat right above their titles, less padding between cards and sections) and raises the smallest reading text to 17px. Customer.io now goes through the Track API's v2 entity endpoint (site ID + API key, identified by email) with the attributes toronto_2026_build_the_vote_volunteer and toronto_2026_build_the_vote_signed_up_at. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
…he site Content now sits in a ~1080px centred column on wide screens, like the original design, with full-width backgrounds and rules. Formstack posts into a hidden iframe, and once it has the submission we send the volunteer to our own step 2 and thanks pages, so the flow no longer depends on the redirects set in CJPAC's Formstack (which currently point at CJPAC's hosted step 2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
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.
Summary
The Election Day volunteer drive we're running with CJPAC, at the address CJPAC suggested:
/toronto/volunteer: the landing page with the sign-up form/toronto/volunteer/step-2: follow-up questions (noindex)/toronto/volunteer/thanks: save the date, invite friends, plan to vote (noindex)Rebuilt from CJPAC's preview (buildthevote2026.netlify.app) using the site's election-page layout,
Button, the election-day countdown and theme tokens. The copy is CJPAC's, with the changes listed below.How it works
FormstackForm.tsx): the forms stay in CJPAC's Formstack account. Their embed scriptdocument.write()s the form, so we capture its output and insert it ourselves; CJPAC's code runs unchanged.formstack.cssrestyles the form to match our inputs and buttons. All the Formstack field IDs are inbuild-the-vote.ts.src/proxy.tsmoves it into a short-lived httpOnly cookie scoped to step 2 and 303s to the clean URL before any HTML is served, so GA, PostHog and the pixels never see it. Other parameters likeutm_*are kept.buildcanadaand hidden. The visitor's ownutm_sourceis left alone, so our analytics stay accurate.volunteer_signed_upfires on reaching step 2, andvolunteer_invite_sharedfires on sharing. Invite links carry referral UTM tags.Copy changes from CJPAC's preview
Needed from CJPAC before launch
https://www.buildcanada.com/toronto/volunteer/step-2/?email={email}. The parameter can beemailorfield199478152.https://www.buildcanada.com/toronto/volunteer/thanks/Test plan
tscpass/step-2?email=…&utm_source=x303s to/step-2?utm_source=xand sets the scoped httpOnly cookiebuildcanada; the opt-in is ticked; the hidden fields havedisplay: none; step 2's hidden email field is filled from the cookieAlso in this PR
gtag-init<Script>insrc/app/layout.tsxinside<head>. It was loose in<html>, so React warned about script order and hydration broke. The script still runs before the page becomes interactive on every page, so GA and Ads tracking should work as before./api/volunteerroute that calls the Track API (/api/v2/entity, identified by email). The profile getsfirst_name,last_name,city,postal_code,toronto_2026_build_the_vote_volunteer: trueandtoronto_2026_build_the_vote_signed_up_at(a Unix timestamp). Nothing goes to York Factory, and the phone number stays with CJPAC only. Before merge, setCUSTOMERIO_SITE_IDandCUSTOMERIO_API_KEYin the deployment env (the workspace is in the US region). Without them, the Customer.io identify is skipped. Tested locally end to end: Formstack accepted the submission, and Customer.io accepted the identify.🤖 Generated with Claude Code