Repository navigation
feat: hero photo A/B test, Resources nav, Donate button and supporting-member donation options - #640
Merged
Merged
Conversation
…te is real Plausible counts every custom event as an interaction unless interactive is false, so popup/nav "Shown" and "Donate Form" events fired on load were stopping visits from counting as bounces. Site-wide bounce rates, including /donate, will rise from this deploy.
- cache-control comment: note the hero photo A/B test also needs / out of shared caches - heroPhotoExperiment test: fake closest() only matches the a[href] selector - re-encode speaker hero WebPs at quality 70 (129 KB / 50 KB) to match control weight
Deploying website with
|
| Latest commit: |
63047d4
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9b7b5a3a.website-aun.pages.dev |
| Branch Preview URL: | https://feat-home-hero-photo-test.website-aun.pages.dev |
Replaces the three TODO credit placeholders and fails the test if a placeholder credit returns.
Resources (opens /tools) holds Updates, Tools, Hiring Palestinians and Media; Tools moves out of Projects, Media out of About, and the top-level Updates link becomes part of Resources. 'Project Opportunities' is now 'Adopt a Project'. A Donate button to /supporting-member sits right of 'Become a Member' on desktop and below it in the mobile menu.
…ation link The /donate page's 'Other ways to give' card is now a shared component, shown beside the payment form on /supporting-member (below it on narrow screens). Its new-tab links gain rel=noopener noreferrer. JoinFlow takes an optional oneTimeDonationHref; /supporting-member sets it to /donate, so 'I want to make a one-time donation' appears under the Step 2 of 2: Payment header. /membership is unchanged.
…ons at 1280px Footer: 'Adopt a Project', Tools and Media move to a new Resources group (with Updates and Hiring Palestinians), five columns on large screens. Desktop nav items sit 1.5rem apart until 2xl so Hub, Become a Member and Donate fit at 1280px.
8 tasks done
'Member Opportunities' (/volunteer) won and is now hard-coded. The nav no longer asks GrowthBook for a variant, sends Nav Label Shown/Click, or adds experiment props to Membership-complete. The daily visitor-id helper stays for the hero photo test, renamed src/lib/navAssignment.ts -> src/lib/visitorAssignment.ts; its env var keeps the NAV_ASSIGNMENT_SECRET name already set in Cloudflare.
Speaker, laptops and stage are now 1:1 crops (1600 and 800 WebP, sized within ~6% of the control photo so no arm loads slower) and centred. Laptops now shows two people and stage only the Tech for Palestine banner, so their alt text follows.
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
Everything to ship before the test starts, in one PR (#639 folded in):
/tools. The footer follows the same structure./supporting-member. Nav items sit a little closer until 2xl so all three buttons fit at 1280px./supporting-member: the/donatepage's "Other ways to give" card now sits beside the payment form (below it on narrow screens), as one shared component used by both pages. Under "Step 2 of 2: Payment" there's a new "I want to make a one-time donation" link to/donate./membershipis unchanged./volunteer) won and is hard-coded. The nav no longer calls GrowthBook or sendsNav Label Shown/Nav Label Click, andMembership-completeno longer carries experiment props. The daily visitor-id helper stays for the hero test, assrc/lib/visitorAssignment.ts. After this deploys, archive thenav-get-involved-labelflag in GrowthBook.Open question for the team: the "Updates" label under Resources may be renamed "Blog" or "Publications".
Hero photo A/B test
Cookieless A/B test of four homepage hero photos: the current photo (
control) against three photos of T4P members at events (speaker,laptops,stage). Results are read in Plausible.Design:
docs/superpowers/specs/2026-11-25-homepage-hero-photo-ab-test-design.md· Plan:docs/superpowers/plans/2026-11-25-homepage-hero-photo-ab-test.mdHow it works
src/pages/index.astroevaluates the GrowthBook flaghomepage-hero-photoduring SSR with the existing daily cookieless visitor id (requestAssignmentId: HMAC of UTC date, IP and User-Agent), so a visitor keeps one photo all day and nothing is stored on their device. Only the assigned photo is downloaded.source: "experiment". Flag off, flag missing, CDN down or an error all showcontroland send no experiment data.hero_photoviaplausible.init({ customProperties }), read from a newanalyticsPropsprop onLayout.astro. Bounce rate, scroll depth and time on page can then be filtered per photo.Homepage Link Click(propdestination) records clicks to/membership,/volunteer,/projectsand/incubatorfrom anywhere on the homepage, including the nav, footer and mobile menu.Plausible counts every custom event as an interaction, so events fired without the visitor doing anything have been stopping visits from counting as bounces. The homepage showed a 3% bounce rate because of this. These events are now sent with
interactive: false:Newsletter Popup Shown,Challenge Popup Shown,Report Popup Shown, andDonate Formon/donateand/donate-2. Bounce rates across the site,/donateincluded, will rise from the deploy date and won't be comparable with earlier periods.Photos: 1600px and 800px WebP files in
public/images/hero/, sized in line with the current photo (~129 KB at 1600px) so no variant loads slower. The people pictured have agreed to appear on the homepage.Before switching the flag on
homepage-hero-photocreated in GrowthBook (string, defaultcontrol), off in all environmentshomepage-hero-photo, hash onid, 4 × 25%, 100% coverage). Flag still off in every environment/api/pipepageview carrieshero_photo; Plausible engagement events carry it too (if not, use the fallback in the spec); a prerendered/sends its pageview only when shown; clicks sendHomepage Link ClickHomepage Link Clickand custom propertyhero_photoChecklist
getEnv(name, locals); no secrets in source or client codestyle=""attributes and no'unsafe-inline'added to the CSPconstantTimeEqual, not===Originbefore parsing the body and validate inputpublic/_redirectsfilterexclude list-newpagespnpm lint,pnpm checkandpnpm testpass (704 tests), pluspnpm build