Lead Closed
Fire the lead_closed event when a lead reaches a final stage in your sales pipeline — Closed Won (deal signed), Closed Lost (deal lost to competitor / no decision / price / etc.), or any equivalent terminal CRM stage. This is the bottom-of-funnel signal for B2B and high-consideration purchases — uploading it as an offline conversion to Google Ads and Meta is the most powerful way to optimize ad delivery toward real revenue.
Fire the event once per close action, typically server-side from your CRM when the deal stage is set to Closed. Use the same event.id as the original lead_created so destinations can match the close to the original capture and compute true ROAS.
This event is the DATA Reshape equivalent of the standard lead-closed event in every major advertising and analytics platform — push it once and Reshape fans it out to every connected destination with the correct platform-specific name and field mapping, so you do not need to fire gtag, fbq, ttq or other tracking function calls in parallel.
- Google Analytics 4 — no dedicated standard event; mapped as a custom event.
- Google Ads — offline conversion upload with
transaction_idfromevent.id, plus Enhanced Conversions fromuser. This is the highest-value signal for Google Ads optimization. - Meta Pixel / Meta Conversions API — no dedicated standard event; Reshape can send a custom CamelCase event
LeadClosed(orLeadClosedWon/LeadClosedLostdepending on configuration). Critical for Meta's offline conversion API. - TikTok Pixel / TikTok Events API — no dedicated standard event; Reshape can send a custom CamelCase event
LeadClosedwhen connected. - Other connected destinations — mapped automatically based on each destination's native schema.
A single Reshape event can produce one or more native events per destination, with different characteristics depending on each website's destination configuration (active pixels, server endpoints, event-mapping rules).
Complete Reference
The lead_closed event accepts the following objects and fields.
event object required
name string required
Use only static value lead_closed for event.name. DATA Reshape maps this to a custom event in GA4, and a custom CamelCase event LeadClosed in Meta and TikTok when connected.
name: "lead_closed"
value number required
For Closed Won: actual deal value (annual contract value, total order value). For Closed Lost: 0.
value: 4500.00
currency string required
Currency code, ISO 4217 three-letter format.
currency: "USD"
id string required
Lead ID (same as the original lead_created ID).
id: "lead_abc123"
properties object recommended
Capture close_outcome (won / lost), closure_reason, sales_cycle_days, deal_type, etc.
context object
For server-side firing (typical), use the API context. View complete Context API Object documentation
url string required-if-applicable
Collected automatically for standard websites. Required only for SPA applications where URL changes don't trigger automatic page context updates.
url:"https://example.com/products/prod_abc123?utm_source=example"
URL Parameter Sensitivity: Be mindful of sensitive information in URLs. Query parameters may contain personal identifiers, session tokens, or private information that should be handled according to privacy regulations.
page_type string recommended
Type of page (product, home ...)
page_type: "product"
environment string recommended
Allowed values: prod, dev
environment: "prod"
user object required
The closed lead identity. Same user.id as in the original lead_created event.
View complete User Object documentation
id string recommended
Unique customer identifier in your system.
id: "cust_abc123"
email string recommended
Customer email address in plaintext. Do not send pre-hashed values — DATA Reshape automatically normalizes and hashes before sending to destinations.
email: "[email protected]"
phone string recommended
Customer phone number in E.164 format (plaintext). Do not send pre-hashed values — DATA Reshape automatically normalizes and hashes before sending to destinations.
phone: "+10000000000"
first_name string recommended
Customer first name
first_name: "Example First Name"
last_name string recommended
Customer last name
last_name: "Example Last Name"
country string
Country name or ISO country code
country: "US"
region string recommended
State, province, or region name
region: "Example Region"
city string recommended
City or locality name
city: "Example City"
street string
Street address including number
street: "123 Sample Street"
postal_code string
Postal code or ZIP code
postal_code: "00000"
orders_total_number number recommended
Cumulative number of orders placed by this user
orders_total_number: 5
orders_canceled_number number recommended
Cumulative number of orders placed and canceled by this user
orders_canceled_number: 0
orders_total_value number recommended
Cumulative lifetime user orders value (decimal format: 2500.50)
orders_total_value: 1234.99
orders_refunded_value number recommended
Cumulative lifetime user orders value canceled (decimal format: 2500.50)
orders_refunded_value: 250.99
predicted_value number
Predicted lifetime value of a customer for your business
predicted_value: 100.99
created_at number recommended
Timestamp in milliseconds since Unix epoch representing the first time the user was recorded
created_at: 1754926521690
properties object recommended
Custom Customer Properties Examples
Use the properties object to store custom user attributes, with property names defined by each business as needed, that enable advanced segmentation, personalization, and analytics across your marketing campaigns.
- E-commerce Customer
- B2B Lead/Customer
- Subscription Service
- Content Platform
properties: {
customer_type: "returning",
membership_level: "platinum",
preferred_category: ["electronics", "fashion"],
last_purchase_date: "2024-12-15",
average_order_value: "350.00",
payment_method_preference: "card",
registration_date: "2023-06-15"
}
properties: {
company_size: "enterprise",
industry: "fintech",
job_title: "marketing_director",
decision_maker: "true",
budget_range: "50000-100000",
lead_source: ["linkedin", "webinar"],
qualification_status: "qualified",
sales_stage: "proposal"
}
properties: {
subscription_tier: "premium",
billing_cycle: "annual",
feature_usage: ["analytics", "reporting", "api"],
trial_user: "false",
renewal_date: "2025-06-30",
support_level: "priority",
usage_frequency: "daily"
}
properties: {
content_preferences: ["technology", "business"],
engagement_level: "high",
newsletter_subscriber: "true",
social_media_follower: "true",
content_consumption: "premium",
device_preference: ["mobile", "desktop"],
timezone: "Example/Timezone"
}
Examples
The examples below show how to push lead_closed for four common close outcomes — Closed Won, Closed Lost - Competitor, Closed Lost - No Decision and Closed Lost - Price — plus an additional Minimal tab with only the required fields.
- Closed Won
- Lost - Competitor
- Lost - No Decision
- Lost - Price
- Minimal
window.reshape = window.reshape || [];
reshape.push({
"event": {
"name": "lead_closed",
"value": 4500.00,
"currency": "USD",
"id": "lead_abc123",
"properties": {
"close_outcome": "won",
"deal_type": "annual_contract",
"sales_cycle_days": 45,
"contract_length_months": 12
}
},
"context": {
"url": "https://crm.example.com/deals/lead_abc123",
"environment": "prod"
},
"user": {
"id": "cust_abc123",
"email": "[email protected]",
"phone": "+10000000000",
"first_name": "Example First Name",
"last_name": "Example Last Name",
"country": "US",
"properties": { "company": "Example Company Inc.", "company_size": "200-500" }
}
});
window.reshape = window.reshape || [];
reshape.push({
"event": {
"name": "lead_closed",
"value": 0,
"currency": "USD",
"id": "lead_abc123",
"properties": {
"close_outcome": "lost",
"closure_reason": "lost_to_competitor",
"competitor_name": "example_competitor",
"sales_cycle_days": 38
}
},
"context": {
"url": "https://crm.example.com/deals/lead_abc123",
"environment": "prod"
},
"user": {
"id": "cust_abc123",
"email": "[email protected]"
}
});
window.reshape = window.reshape || [];
reshape.push({
"event": {
"name": "lead_closed",
"value": 0,
"currency": "USD",
"id": "lead_abc123",
"properties": {
"close_outcome": "lost",
"closure_reason": "no_decision",
"closure_detail": "project_postponed",
"sales_cycle_days": 90
}
},
"context": {
"url": "https://crm.example.com/deals/lead_abc123",
"environment": "prod"
},
"user": {
"id": "cust_abc123",
"email": "[email protected]"
}
});
window.reshape = window.reshape || [];
reshape.push({
"event": {
"name": "lead_closed",
"value": 0,
"currency": "USD",
"id": "lead_abc123",
"properties": {
"close_outcome": "lost",
"closure_reason": "price",
"closure_detail": "budget_constraints",
"sales_cycle_days": 60
}
},
"context": {
"url": "https://crm.example.com/deals/lead_abc123",
"environment": "prod"
},
"user": {
"id": "cust_abc123",
"email": "[email protected]"
}
});
window.reshape = window.reshape || [];
reshape.push({
"event": {
"name": "lead_closed",
"value": 4500.00,
"currency": "USD",
"id": "lead_abc123"
},
"user": {
"id": "cust_abc123",
"email": "[email protected]"
}
});
Custom properties (event.properties, user.properties, products[*].properties) are fully processed server-side. On browser-side pixels and tags, only a subset may be available. Server-side processing can also enrich the outgoing payload with additional parameters derived from context and data quality.
Best Practices
- Use the same
event.idas the originallead_created— this is what lets Google Ads and Meta attribute the closed deal to the original click and compute true ROAS. - Fire server-side from your CRM — this is always a CRM-originated event, not a browser event.
- For Closed Won, set
event.valueto the actual deal value — this is the single most important number for ad-platform value-based optimization. - For Closed Lost, set
event.valueto0and captureclosure_reason— useful for negative-audience signals and pipeline analytics. - Upload as offline conversion — this is the highest-leverage use of
lead_closed. Both Google Ads and Meta have offline-conversion APIs that ingest this event and use it to retrain ad-delivery algorithms toward similar high-value users. - Capture
sales_cycle_days— useful for benchmarking sales velocity and feeding back into qualification rules.