A four-clinic optometry group asked for proof, not promises: which locations and which campaigns produce booked appointments. Their decade-old WordPress site could not answer, so we rebuilt it from the ground up on a code-first stack, cut 126 crawled URLs down to 46 purposeful pages, and engineered measurement across the third-party booking domain that had been erasing every appointment's origin. Two months after cutover the site loads its headline in 1.7 seconds on throttled mobile, organic click-through has nearly tripled, every tracked commercial ranking survived the migration, and July alone recorded 460 completed new-patient bookings with channel and location attribution attached.
The Challenge
The previous site was a WordPress build carrying a decade of accumulated technical debt, and it failed the practice in three distinct ways.
Performance dragged on the devices that matter. Mobile audits during discovery scored the old site around 70, with recurring image-delivery and caching problems. Most "optometrist near me" traffic is mobile, and a slow site costs bookings before a patient ever reaches the contact page.
The search index was bloated with pages that never produced a patient. Search engines were crawling 126 URLs, and a large share were aging blog posts on general eye trivia. In March and April 2026 alone, pages outside the site's commercial core generated roughly 44,000 impressions and just 131 clicks: a click-through rate under 0.3%. That surplus content diluted the site's topical focus while the four location pages and the specialty services fought for attention.
Measurement was broken at the most important step. The practice books appointments through a third-party scheduling platform that runs on its own separate domain. When a patient clicked from the website into the booking system, analytics treated the jump as the end of one visit and the start of an unrelated one, so the original ad, campaign, or organic search was lost. The practice could see traffic, and it could see bookings, but it could not connect the two. The owner had asked specifically for year-over-year, per-location conversion reporting, and the old architecture made that impossible.
Our Approach
We rebuilt the entire site on a code-first stack: Next.js with TypeScript, content managed as structured data and MDX in the codebase, deliberately no CMS. That choice removes the WordPress plugin-security treadmill, raises the performance ceiling, and makes the site maintainable by AI agents, because structured, typed, documented code is something an agent can read and modify confidently. The full build is 46 pages: home, 4 location pages, 12 service pages, nearly 20 optometrist profiles, plus booking, insurance, contact, and policy pages.
Every page was structured for local search. Location pages carry MedicalClinic and LocalBusiness structured data with accurate name-address-phone, hours, and live Google review ratings; service pages carry FAQPage markup; every provider profile carries Physician markup. Signature specialty services route deliberately to the clinics best positioned to deliver and rank for them, so the right location competes for the right high-value search. The clinics' 4.8 to 4.9 star Google ratings, built on hundreds of reviews each, surface directly on the location cards.
Delivery is edge-first: the site sits behind a CDN with an intentional caching policy (static assets for a year, images for a week, HTML for an hour, API bypassed) and an automatic cache purge on every deploy.
The measurement layer was the hardest engineering in the project. We stitched sessions across the practice's domain and the booking provider's domain so the original source, medium, and campaign travel with the patient instead of resetting at the handoff. The booking handoff itself was re-engineered as a genuine trackable click, because cross-domain linking silently ignores programmatic redirects. Our identity cookie is namespaced separately so the booking provider's own analytics remain completely untouched. Booking-funnel events flow into the practice's analytics property, and Google Ads click IDs are captured on landing and forwarded through to the booking URL. Everything runs through Google Tag Manager, so the marketing team can adjust tracking without a code deploy.
Accessibility and privacy were treated as first principles, not add-ons: WCAG 2.2 Level AA across public pages, no web form that invites medical detail, form contents that never reach analytics, and external PHI-handling systems clearly disclosed. The contact form's disclosure satisfies Alberta PIPA without a consent banner.
The Results
The speed results hold up under scrutiny. The rebuilt homepage paints its headline in 1.7 seconds on an emulated mobile device with network and CPU throttling, with a cumulative layout shift of 0.08. The whole page, analytics and tag manager included, weighs 746 KB across 34 requests, and server response time stays under 350 ms through the CDN. The image-delivery and caching problems that dogged the old build are designed out rather than patched: image optimization is native to the framework, and caching is a declared policy at the edge instead of a plugin setting.
The search results show a deliberate trade of empty impressions for qualified clicks. Sitewide organic click-through rose from 1.1% to 2.9% while average position held around 9, which means the site now earns roughly the same commercial clicks from a third of the impressions. The pages that book patients held or grew through the migration: location pages averaged 17.2 organic clicks per day before cutover and 18.3 after, and clicks to optometrist profiles rose 67% per day, because patients search for doctors by name and nearly twenty structured, personal profile pages now answer them. Rankings crossed the migration intact, with 24 of 38 tracked commercial keywords in the top 10 on both sides of cutover.
The attribution results answer the owner's original question. Since cutover, the booking funnel reports into the practice's own analytics across the booking provider's domain boundary: 133 website booking handoffs in the partial May window, 401 in June, and 436 in July, alongside 460 completed new-patient bookings in July and 370 tracked phone-call clicks since June. New-patient completions can exceed website handoffs because the cross-domain layer also captures bookings that begin outside the site, from bookmarks or Google Business Profile links, so the practice sees the whole funnel rather than just the slice that started on its homepage.
The measurement layer also feeds the advertising forward. Conversion values distinguish a specialty contact-lens fitting from a routine check, five remarketing audiences are defined and mapped to campaign uses, and every event carries a location identifier, so dashboards finally report conversions per clinic.
Two metrics are behaving the way post-migration metrics do, and we monitor both daily rather than declaring victory early. Specialty-service pages moved to new URLs and are still re-earning the rankings their old counterparts held, and a volume-weighted visibility index that includes that long tail dipped through the migration window for the same reason. The tracked commercial keyword set is stable, which is the leading indicator we care about; service-page recovery is the trailing one, and it is reported honestly, per location, from the same measurement layer described above.
Read more about web design and development, local SEO for multi-location practices, and our optometry industry work. If your website can show you traffic but cannot show you booked appointments, talk to us.