SEM
Back to all guides
Leads & emailBeginner6 min read

Capturing leads with the SEM CRM

Drop a public lead-capture endpoint into your landing pages, segment leads by source, and follow up via email — without leaving SEM.

Every ad you run that ends in "click here, fill out this form" should hit the SEM CRM. That way every lead is automatically:

  • Tagged with which platform / campaign sent them
  • Available for email follow-up sequences
  • Visible alongside your ad metrics in one app

Three ways to add a contact

1. Public form endpoint (recommended)

Every workspace gets a public POST endpoint:

POST https://sem.cgmimm.com/api/public/leads/<your-org-slug>

Send JSON like:

{ "email": "user@example.com", "first_name": "Sarah", "phone": "+15125551234", "source": "google_search_ad" }

The endpoint upserts into your contacts table. CORS is permissive by default so you can post directly from any landing page. (Lock it down to specific origins via the LEADS_ALLOWED_ORIGINS env if you want.)

2. Manual entry

On /crm/contacts, click "Add contact." Useful for handful imports — referrals, customers met at events, etc.

3. CSV import (coming soon)

A CSV upload UI is on the roadmap. Until then, drop CSV rows directly into your Supabase table or POST them in a loop against the public endpoint.

Tagging by source

Always include a source field with each new contact. Recommended values:

  • google_search — Google Ads search campaign
  • google_pmax — Performance Max
  • meta_facebook — Facebook ad
  • meta_instagram — Instagram ad
  • nextdoor — Nextdoor ad
  • cgmimm — CGMIMM Ads
  • organic — anyone who hit your site without an ad UTM
  • referral — direct word-of-mouth

You can later filter contacts by source on the contacts page or use it as a segment for email campaigns.

A working <form> snippet
<form id="lead">
  <input type="email" name="email" required />
  <input type="text" name="first_name" />
  <button type="submit">Get the demo</button>
</form>
<script>
  document.getElementById('lead').addEventListener('submit', async (e) => {
    e.preventDefault();
    const fd = new FormData(e.target);
    await fetch('https://sem.cgmimm.com/api/public/leads/your-org-slug', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        email: fd.get('email'),
        first_name: fd.get('first_name'),
        source: 'google_search_ad'
      })
    });
    window.location = '/thank-you';
  });
</script>

What to do with contacts once they're in

  • Send a welcome email — automatic if you set up a sequence triggered on tag-add.
  • Tag for re-targeting — upload your contacts list as a Custom Audience back into Google / Meta.
  • Watch the source breakdown — over time you'll see which platform brings the highest-LTV leads.
  • Trigger a sequence — see the email sequences guide.

Privacy and compliance

The public endpoint accepts any email someone enters in your form. You're responsible for getting consent (a checkbox, terms link, or implied consent based on context). If you're sending marketing emails to that contact later, double-check your local rules — GDPR, CAN-SPAM, CASL all have specific consent requirements.

Capture every lead from every ad.

14-day free trial. No credit card. Bring your platforms with you.