Standard UTM parameters
| Param | Use | Example |
|---|---|---|
utm_source | Traffic source / partner | jsjd, google |
utm_medium | Channel | display, cpc, email |
utm_campaign | Campaign slug | retarget, abm, np |
utm_term | Paid search keyword (optional) | from Google Ads |
utm_content | Creative / ad variation | size or creative ID |
keyword | Legacy / partner keyword field | mirrored when present |
Client-side capture
On every page load, a small inline script reads location.search. If any UTM/keyword is present, it writes JSON to sessionStorage.cnsvs_campaign including landing (pathname). Attribution survives multi-page browsing within the session.
demo_campaign field
On demo submit, the form sends demo_campaign as a JSON string containing the stored UTMs + keyword + landing path. The /api/demo relay forwards it urlencoded to demo.php (verified contract: PHP echoes query-string UTMs into this field on the legacy path).
{
"utm_source": "jsjd",
"utm_medium": "display",
"utm_campaign": "retarget",
"keyword": "",
"landing": "/demo"
}
Relay behavior
- Client POSTs to
/api/demo(preferred). - Function GETs demo.php, regexes
StartUp(<digits>)for freshsts. - Forwards fields: first_name, last_name, email, practice, dob_year, ckbox1=on, sts, empty dob_month/dob_day, demo_campaign.
- On failure, browser falls back to native POST to demo.php with JS-computed sts.
Salesforce / Dave mapping (handoff)
Web-to-lead field mapping is owned with Dave Ford. Recommended:
- Map UTM source/medium/campaign into dedicated lead fields (or a single campaign blob if schema-limited).
- Preserve
demo_campaignraw JSON for audit. - Optional: promo-code attribution if marketing introduces codes later — store as separate lead field; do not overload honeypots.
Dependency: Dave must green-list cnsvs.net / Vercel egress for demo.php. Coordinate one live test lead — do not blast tests.
