Skip to content
Code samples below use example values.

Lead form submissions

Beyond event tracking, Prism can deliver leads from a landing-page form straight into your CRM (GoHighLevel) or inbox — no server code on your side. Prism holds the CRM credentials; your page only sends the form fields.

Endpoint

POST https://track.yourdomain.com/v1/leads/submit
Content-Type: application/json

The response is synchronous, so you can confirm receipt inline.

Payload

js
const res = await fetch('https://track.yourdomain.com/v1/leads/submit', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    client_id: 'cl_yourclient',        // required
    first_name: 'Jane',                // required
    phone: '(555) 123-4567',           // required
    email: '[email protected]',         // required
    last_name: 'Doe',

    // Optional — CRM routing
    tags: ['landing-page', 'spring-promo'],
    pipeline_id: '...',                // GHL pipeline for the Opportunity
    pipeline_stage_id: '...',          // required together with pipeline_id

    // Optional — consent flags (mapped to CRM tags)
    sms_appointment_consent: true,
    sms_marketing_consent: false,

    // Optional — attribution
    source_url: window.location.href,
    utm_source: '...', utm_medium: '...', utm_campaign: '...',

    // Optional — email-delivery mode only
    extra: { 'Home size': '1,500–2,500 sq ft' },  // rendered as a Qualification section
    subject_prefix: '[High Priority]',
    source_name: 'Spring landing page',
  }),
});
const result = await res.json();
// GHL mode: { success, contact_id, opportunity_id }
// Email mode: { success, delivery: 'email' }

A successful response means the lead is safe, not that your CRM has it

Prism stores every submission before attempting delivery. If your CRM is unreachable, the response is still success with delivery: 'queued', and delivery is retried in the background. Show the visitor a thank-you — telling them it failed would only produce a duplicate submission of a lead we already have. Anything that never gets through is visible in the Leads tab.

Delivery modes

Configured per client by your agency in Adsidian:

  • GoHighLevel — creates a Contact (and an Opportunity when a pipeline is configured or passed). Tags let GHL workflows branch per landing page.
  • Email — for clients without a CRM: the lead is delivered to a configured inbox, with extra rendered as a qualification summary.

Pair it with a conversion event

Submitting a lead and tracking the conversion are separate calls — fire both:

js
await fetch('https://track.yourdomain.com/v1/leads/submit', { ... });
window.prism('track', 'Lead', { email, phone, first_name, last_name });

The event is what reaches Meta/Google for optimization; the lead submit is what reaches your CRM.

Adsidian Prism — first-party server-side tracking.