Lead generated

Learn how to track when a user becomes a lead.

This event tracks when a user becomes a lead.

Croct's mascot neutral
When should you track this event?

Track this event whenever a user submits a form or does any action that represents they become a lead.

Implementation

Here is an example of how to track this event:

example.js
12345678910111213
import croct from '@croct/plug';
croct.track('leadGenerated', {  leadId: '1ed2fd65-a027-4f3a-a35f-c6dd97537392',   lead: {    firstName: 'Carol',     lastName: 'Doe',     email: 'carol@croct.com',     custom: {      source: 'homepage'    }  }});

Input properties

These are the supported properties:

leadId(optional)
string

The lead's unique identifier provided by the application, such as a UUID.

The value must be between 1 and 100 characters long.

currency(optional)
string

The currency in which the lead monetary value is expressed, such as "USD" or "EUR".

We recommend using the 3-letter currency codes defined by the ISO 4217 standard. For currencies having no official recognition in the standard, consider using ISO-like codes adopted locally or commercially, such as "XBT" for BitCoin.

value(optional)
number

The monetary value associated with the lead.

The value must be non-negative.

lead(optional)
object

The lead profile.

See the user reference for the full list of supported attributes.

Processed properties

These properties are automatically tracked:

leadId(optional)
string

The lead's unique identifier.

currency(optional)
string

The currency in which the lead monetary value is expressed, such as "USD" or "EUR".

value(optional)
number

The monetary value associated with the lead.

patch(optional)
object

A series of operations derived from the lead input property.

The patch created from the input lead is used internally to reflect changes in the user profile.

Payload examples

Below are some payload examples for this event:

1234567891011121314151617181920212223242526272829303132
{  "leadId": "1ed2fd65-a027-4f3a-a35f-c6dd97537392"  "currency": "USD",  "value": 100,  "lead": {    "firstName": "Carol",    "lastName": "Doe",    "birthDate": "2000-08-31",    "gender": "female",    "email": "carol@croct.com",    "alternateEmail": "example@croct.com",    "phone": "+15555983800",    "alternatePhone": "+15555983800",    "address": {      "street": "123 Some Street",      "district": "Kings Oak",      "city": "San Francisco",      "state": "California",      "region": "California",      "country": "US",      "continent": "NA"    },    "avatar": "http: //croct.com/carol.png",    "company": "Croct",    "companyUrl": "http: //croct.com",    "jobTitle": "Head of Marketing",    "custom": {      "points": 1,      "favoriteEmoji": "🐊"    }  }}