Tracking

UTM conventions & demo_campaign

How campaign parameters flow from ads → cnsvs.net → demo form → demo.php (and eventually Salesforce).

Standard UTM parameters

ParamUseExample
utm_sourceTraffic source / partnerjsjd, google
utm_mediumChanneldisplay, cpc, email
utm_campaignCampaign slugretarget, abm, np
utm_termPaid search keyword (optional)from Google Ads
utm_contentCreative / ad variationsize or creative ID
keywordLegacy / partner keyword fieldmirrored 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

  1. Client POSTs to /api/demo (preferred).
  2. Function GETs demo.php, regexes StartUp(<digits>) for fresh sts.
  3. Forwards fields: first_name, last_name, email, practice, dob_year, ckbox1=on, sts, empty dob_month/dob_day, demo_campaign.
  4. 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:

Dependency: Dave must green-list cnsvs.net / Vercel egress for demo.php. Coordinate one live test lead — do not blast tests.