Rechat SDK
    Preparing search index...

    Class LeadTracker

    Lead tracker makes it easy to track user activity when they visit listings on your website.

    const sdk = new Rechat.Sdk({
    tracker: {
    cookie: {
    name: 'my-awesome-tracker' // default: rechat-sdk-tracker
    }
    }
    })

    // track by mlsid
    sdk.Leads.Tracker.capture({ mlsid: '1841395151' })

    // track by listing id
    sdk.Leads.Tracker.capture({ listing_id: '0abf9846-e778-4650-a8e0-6eea207cc3d6' })

    Call the stop method to disable tracking and remove the cookie.

    const sdk = new Rechat.Sdk({
    tracker: false
    })

    sdk.Leads.Tracker.stop()

    Rechat automatically assigns the tracker when creating a new lead, but you can also set it manually if you already have the lead Id.


    const sdk = new Rechat.Sdk({
    tracker: false
    })

    sdk.Leads.Tracker.identify(leadId)

    Set tracker: false to disable tracking. This won’t remove any previously set cookies.

    const sdk = new Rechat.Sdk({
    tracker: false
    })

    Hierarchy

    • SdkBase
      • LeadTracker
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Captures a user's interaction with a specific listing or mlsid.

      Parameters

      • data: ITrackPayload

        The payload containing tracking event details.

      Returns Promise<void>

      Promise that resolves on successful capture or rejects on failure.

    • Saves the user's unique identifier in a tracking cookie.

      Parameters

      • id: string

        Unique identifier for the lead.

      Returns void

    • Removes all stored tracking data, including cookies, to stop tracking.

      Returns void