Usermaven
Dark mode

Lead Tracking

Lead tracking in Usermaven helps you capture, manage, and analyze potential customers who interact with your website. When visitors submit forms, sign up for newsletters, or request demos, Usermaven tracks them as leads in your Contacts Hub.


What is a lead?

A lead is a potential customer who has expressed interest in your product or service by providing their contact information, typically through a form submission. In Usermaven, leads are:

  • Identified by email address (required)

  • Enriched with additional information (name, company, phone, etc.)

  • Tracked across their entire journey on your website

  • Stored in your Contacts Hub for analysis and follow-up


Why track leads?

Lead tracking provides valuable insights for marketing and sales teams:

  • Identify high-intent visitors: Know who's interested in your product

  • Track lead sources: Understand which channels drive the most leads

  • Monitor lead behavior: See what pages leads visit before and after converting

  • Qualify leads: Use behavioral data to prioritize follow-up

  • Measure marketing ROI: Connect marketing efforts to lead generation


How lead tracking works

Lead Tracking Journey
  1. Visitor interaction: A visitor interacts with your website—viewing pages, clicking buttons, and engaging with content. Usermaven tracks this activity with an anonymous ID.

  2. Lead capture: When the visitor provides their email (via form submission or the lead() function), they become a lead. The email is the required identifier.

  3. Identity resolution: Usermaven links the visitor's previous anonymous activity to their new lead profile, giving you a complete picture of their journey.

  4. Contacts Hub: The lead appears in your Contacts Hub where you can view their profile, see their activity history, and segment them for analysis.


Ways to capture leads

Automatic (via Form Tracking): When form tracking is enabled and forms are mapped, submissions automatically create leads. Enable form tracking, map form fields to contact properties, and form submissions will create/update leads automatically.

Manual (via lead() function): Use the lead() function to capture leads programmatically:

JavaScript Snippet

<script>
  window.usermaven('lead', {
    email: 'lead@example.com',        // Required
    first_name: 'Alex',
    last_name: 'Johnson',
    company: 'StartupXYZ',
    phone: '+1 555 0100',

    // Custom properties (passed directly, no wrapper needed)
    lead_source: 'Google Ads',
    campaign: 'Q1 Product Launch',
    utm_source: 'google',
    utm_medium: 'cpc',
    interest: 'Enterprise Plan',
    company_size: '50-100'
  });
</script>

NPM Package


const usermaven = usermavenClient({
  key: 'YOUR_API_KEY',
  trackingHost: 'https://events.usermaven.com'
});

usermaven.lead({
  email: 'lead@example.com',        // Required
  first_name: 'Alex',
  last_name: 'Johnson',
  company: 'StartupXYZ',
  phone: '+1 555 0100',

  // Custom properties (passed directly, no wrapper needed)
  lead_source: 'Google Ads',
  campaign: 'Q1 Product Launch',
  utm_source: 'google',
  utm_medium: 'cpc',
  interest: 'Enterprise Plan',
  company_size: '50-100'
});

React / Next.js


function LeadCaptureForm() {
  const { lead } = useUsermaven();

  const handleSubmit = (e) => {
    e.preventDefault();
    const formData = new FormData(e.target);

    lead({
      email: formData.get('email'),        // Required
      first_name: formData.get('first_name'),
      last_name: formData.get('last_name'),
      company: formData.get('company'),
      phone: formData.get('phone'),

      // Custom properties (passed directly, no wrapper needed)
      lead_source: 'Website Form',
      interest: formData.get('interest')
    });
  };

  return (
    <form onSubmit={handleSubmit}>
      {/* form fields */}
    </form>
  );
}

Learn more about capturing leads →


Lead properties

When capturing a lead, you can include various properties:

Property

Description

Required

email

Lead's email address

Yes

first_name

First name

No

last_name

Last name

No

company

Company name

No

phone

Phone number

No

job_title

Job title

No

Custom properties

Any additional data

No


Leads vs Users

In Usermaven, there's a distinction between leads and users:

Leads

Users

Potential customers

Active product users

Captured via forms or lead()

Identified via id()

Pre-signup stage

Post-signup stage

Marketing focus

Product focus

A lead can become a user when they sign up for your product. Usermaven maintains continuity by linking both profiles if the same email is used.


What's next?

Was this article helpful?