Related Projects Tracking
When a visitor submits forms for multiple real estate projects (on the same page or across pages), each lead records which other projects the same person has already inquired about.
Why This Matters
Real estate websites often display multiple projects on a single page. A serious buyer may submit inquiry forms for 2-3 projects. Sales teams need to know:
- Which other projects this buyer is interested in
- How many projects they've inquired about (cross-sell opportunity)
- Whether to coordinate follow-ups across teams handling different projects
How It Works
When a lead comes in, lookupRelatedProjects() queries past leads from the same visitor using a 3-tier identity match:
- Visitor ID (strongest) — same browser, same tracker.js session
- Email (cross-device) — same person, different IP or device
- IP (fallback) — same network, no visitor_id or email match yet
The current project is excluded from the list. Results are stored as a comma-separated string.
Example Flow
| Submission | Project | RelatedProjects |
|---|---|---|
| 1st | Sky Towers | (empty) |
| 2nd | Garden View | Sky Towers |
| 3rd | Lake Residences | Sky Towers, Garden View |
Webhook Payload
json
{
"project_name": "Lake Residences",
"related_projects": "Sky Towers, Garden View",
"form_submit_count": 3,
"engagement_label": "Hot"
}D1 Schema (Migration 007)
sql
ALTER TABLE Leads ADD COLUMN RelatedProjects TEXT;CRM Usage
- Show "Also interested in: Sky Towers, Garden View" on the lead card
- Coordinate follow-ups when the same buyer contacts multiple project teams
- Use
form_submit_countcombined withrelated_projectsto identify high-intent buyers exploring multiple options