A proof of concept built against live data: add a hashed-PII fallback (Enhanced
Conversions for Leads) for the web conversions that have no gclid, using the email/phone
now confirmed in contacts. Re-measured against the real Supabase data.
| Stage | gclid-only (deterministic) | + ECL-eligible | Combined uploadable | Uplift vs gclid-only |
|---|---|---|---|---|
| Quotes | 1,475 (34% of web) | +1,249 | 2,724 — 63% of web | +85% |
| Orders | 167 (35% of web) | +254 | 421 — 89% of web | +152% |
After ECL, the web conversions we can't reach at all collapse to 77 quotes / 10 orders
(unmatched_no_key). The remaining misses are now mostly structural: out-of-window
(long sales cycles) and non-web RFQs (which have no ad click by definition).
fourstar.source.eligible_pii)A contact's email/phone is used only if the contact is consented and valid:
- not deleted, not do_not_contact, suppressed_at is null;
- email used only when present and email_is_valid; phone used when present.
Window: ECL uses the 63-day offline window (tighter than gclid's 90), with rfq_date
as the click proxy (the no-gclid web visit). Out-of-window rows are flagged, not sent.
source.py: deals → contacts join (batched), consent/validity filter, populates
email/phone + rfq_date on no-gclid web rows only.matching.py: ECL branch uses rfq_date as the click proxy for the 63-day window.pipeline.py: report now shows gclid / +ECL / combined + the uplift line.Reproduce: uv run python -m fourstar.pipeline --report --days 90
Quotes/Orders actions have Enhanced Conversions for Leads enabled and
the account has accepted customer-data terms (else CUSTOMER_NOT_ACCEPTED_CUSTOMER_DATA_TERMS).scripts/validate_account.py to the
hashed-PII path), then send via the Data Manager API userData.userIdentifiers leg.