Landing (swapps-campaigns)

The Landing site is Swapps' marketing/campaigns site: a self-contained set of campaign landing pages published at the root of the go.swapps.com subdomain (for example go.swapps.com/website-support). It is deliberately separate from the main site (swapps-client / swapps.com) so paid-traffic and acquisition campaigns can ship without touching swapps.com, while staying 100% on-brand.

Naming

The repository is swappsco/swapps-campaigns and the local working folder is swapps-landing. The Cloudflare Pages project is named swapps-landing in wrangler.toml, and the platform DNS maps the production hostname go.swapps.com to a Pages project (*.pages.dev). Throughout the platform this app is referred to as swapps-campaigns.

landing is a folder name, not a URL

There is no /landing path. Public URLs are the slugs at the root of the subdomain: go.swapps.com/{slug} (English) and go.swapps.com/es/{slug}/ (Spanish).

Stack

Aspect Choice
Framework Vike + vike-react + React 19
Build tool Vite 7
Styling Sass (Swapps design tokens copied from swapps-client)
Rendering Pages prerendered to static HTML (SSR at build time)
Hosting Cloudflare Pages (static assets, no Worker script, no Pages Function)
Content model Config-driven — every landing is one entry in data/landings.ts
Leads POST to swapps-worker /api/support/send → Pipedrive
Analytics Google Tag Manager + window.dataLayer events
Testing Playwright end-to-end (e2e/)

Because pages are prerendered to static HTML, the runtime JavaScript is minimal, which keeps Lighthouse scores high — important for ad-quality and conversion.

Role in the platform

  • Hostname: go.swapps.comswapps-campaigns Cloudflare Pages project (*.pages.dev).
  • Leads flow back into the platform through swapps-worker (/api/support/send), the same path swapps-client's contact form uses — so campaign leads land in Pipedrive and trigger the sales notification email.
  • Design system is shared with swapps-client: the tokens, mixins, base styles and Ofelia fonts were copied into this repo so it builds and deploys independently. See Architecture → Keeping in sync.
flowchart LR U["Visitor (ad / link)"] --> CF["Cloudflare Pages (swapps-campaigns)"] CF --> L["Prerendered landing (go.swapps.com/{slug})"] L --> W["swapps-worker /api/support/send"] W --> P["Pipedrive + sales email"]

Quick navigation

Page What you'll find
Getting Started Local setup, dev server, npm scripts.
Architecture Project structure, Vike routing, config-driven landings, lead flow.
i18n and Content EN/ES bilingual landings, content config, GTM/analytics events.
Testing Playwright e2e (automatic + manual), pre-push gate.
Deployment Cloudflare Pages deploy, preview vs prod, the swapps-campaigns project.