The referral landing page for Dr. Clemans's patients.
Plain PHP. No build step. No npm. Drop it on any host that runs PHP 7.4 or later.
.
├── index.php # The landing page (A/B variant chosen server-side)
├── submit.php # Form handler — emails coach@, optionally posts to a Google Sheet
├── thank-you.php # Post-submission confirmation
├── privacy.php # Privacy policy
├── config.example.php # Copy this to config.php and fill in
├── apps-script.gs # Google Apps Script for the Sheet webhook
├── .htaccess # Apache: denies access to config + includes
├── assets/css/styles.css # Single stylesheet
└── includes/
├── head.php
├── footer.php
└── variant.php # A/B logic and word swaps
Copy the config template and fill it in:
cp config.example.php config.php
Open config.php. Set intake_email to wherever you want intake submissions sent (default: coach@neurowellnessdojo.com). Set mail_from to a noreply alias on the same domain — shared hosts reject mail with a mismatched From.
SFTP / rsync / git pull the directory to your webroot (or a subdirectory if you're running it under another site).
rsync -av --exclude='.git' ./ user@host:/var/www/neurowellnessdojo/
Email is the source of truth. The Sheet is for tracking conversion by A/B variant.
- New Google Sheet. First row headers:
timestamp | name | email | message | variant. - Extensions → Apps Script. Paste in the contents of
apps-script.gs. - Deploy → New deployment → Web app.
- Execute as: Me
- Who has access: Anyone
- Copy the deployment URL. Paste into
config.phpassheets_webhook_url.
The "Anyone" access only lets external requests write to the script — it doesn't expose the Sheet contents.
coach@neurowellnessdojo.com should forward to Kenneth's working inbox. Most registrars and hosts offer a free forwarding alias. Set up noreply@neurowellnessdojo.com as a valid sender too, so outgoing mail doesn't get spam-filtered.
Once HTTPS works, uncomment the redirect block in .htaccess.
- First visit: server flips a coin, sets cookie
nwd_varianttoAorB, valid for a year. - Returning visit: cookie sticks, same version shown.
- The form submission records which variant the visitor was on, so you can see in the Sheet which variant converts.
- No client-side JavaScript involved.
Variant A uses "somatic" language. Variant B uses "mind/body" language. The only sections that differ are "What this is," "Your coach," and "The practice." Everything else is identical.
To stop the test and lock to one variant: set nwd_variant cookie manually in your browser, or hardcode the return value in includes/variant.php.
- PHP
mail()uses sendmail under the hood. On most shared hosts this works for low volume. If deliverability becomes a problem, switch to SMTP via PHPMailer — thesubmit.phpis small enough to swap the send block easily. - Rate limiting is session-based: one submission per 60 seconds per session. Stops drive-by spam but doesn't stop a determined attacker.
- Honeypot field in the form catches dumb bots. Real users never see it; bots filling every field will trip it and get a silent fake-success redirect.
- CSRF token stored in session, regenerated per form load, burned on submit.
index,followis set in the page head — the page is currently indexable. Change tonoindex,nofollowinincludes/head.phpif you want to keep it off search engines.- No external JS loads. The only third-party request is the Lora webfont from Google. To run fully zero-third-party, self-host the font and edit
includes/head.php.
Two placeholders remain in privacy.php:
- The effective date (
[SET ON LAUNCH]) — replace with the date you go live. - The optional mailing address at the bottom — CCPA compliance is cleaner with one but it's not strictly required.
- Fill in
config.php - Set up
coach@andnoreply@aliases - Create the Sheet and deploy the Apps Script
- Paste the webhook URL into
config.php - Install SSL, uncomment the HTTPS redirect in
.htaccess - Set the effective date in
privacy.php - Send yourself an intake submission to verify email + Sheet write
- Clear your own cookies and load the page from two browsers to confirm A and B both render
- Confirm the lineage / credentials text on page reads correctly with Richard
- Confirm Kenneth's bio line with Kenneth
- Confirm Dr. Clemans is comfortable being named on the page
- Confirm the no-AI-retention line is accurate given your actual Zoom / WhatsApp setup