Integrations · Tilda · UTM · monitoring
Tilda → Bitrix24: requests, UTM and monitoring with no losses
Client:
Online school, NDA
Category: Integrations
Stack: PHP 8, Tilda webhooks, Bitrix24 REST, cron, Bitrix24 notifications
Timeline: rolled out in stages
Problem
Registrations from Tilda reached Bitrix24 almost without a source, so advertising was evaluated blind. Once, a broken hook cost the school 450 registrations — and nobody noticed in time.
Constraints
Tilda decides on its own whether to retry a submission, and broken intake is invisible from the outside. Contacts were already duplicated, UTM for past months existed only in exports, and merging contacts is irreversible.
What I did
- Idempotent intake by tranid: a retry does not create a duplicate, and on error the receiver responds 502 so that Tilda retries
- UTM tags collected from form fields, cookies and referrer; fixed corruption of Cyrillic in tags and names
- Hourly merging of duplicate contacts by phone with a cap on merges per run; without an explicit argument — report only
- One-time UTM recovery from CSV exports: only empty fields are filled, existing data is never overwritten
- Integration monitoring every 15 minutes: silence from Tilda during working hours, the ChatApp queue, stuck jobs — with notifications right in Bitrix24
Architecture
Tilda
→ Idempotent receiver
→ UTM and deduplication
→ Bitrix24 REST
→ Monitoring every 15 minutes
Result
After recovery, 2,932 of 4,284 Tilda deals have a source — instead of 115. A stop in lead intake now shows up within 15 minutes in Bitrix24 itself, not a month later in a report.
What can be reused
Idempotent webhook receiver answering 502 to trigger a retry
UTM collection from form, cookie and referrer
Integration healthcheck with notifications in Bitrix24