Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 3 min read

How to Preserve Lead Attribution When a Contact Submits Again

In October, a prospect clicks a LinkedIn ad and asks about CRM implementation. In November, the same person clicks a newsletter link and requests a demo. The CRM correctly matches the second enquiry to the existing cont

In October, a prospect clicks a LinkedIn ad and asks about CRM implementation. In November, the same person clicks a newsletter link and requests a demo.

The CRM correctly matches the second enquiry to the existing contact. Then it overwrites the contact’s source with newsletter.

Sales still has the right contact, but marketing has lost the recorded source of the first enquiry. Capturing UTMs on the website solves only part of the problem. The CRM also needs rules for what gets saved and when it can change.

Store contact attribution and enquiry attribution separately

A contact represents a person. An enquiry represents a request at a particular time. Each can carry campaign information, but the fields serve different reporting needs.

Field Stored on Update rule
Original enquiry source Contact Capture from the earliest accepted enquiry under your policy. Correct only through a documented process.
Latest tagged enquiry campaign Contact Update when a newer accepted enquiry includes valid campaign data.
Source, medium, and campaign Enquiry Save a snapshot for each accepted submission.
Submission ID and acceptance time Enquiry Use the ID to recognize retries and the time to order accepted enquiries.

Define original precisely. In this example, it means the source captured on the earliest accepted enquiry you know about. The visitor may have encountered the business earlier through a channel you did not capture.

Walk through a repeat enquiry

Consider a hypothetical contact with three submissions:

Enquiry Captured source Captured campaign Result
8 Oct linkedin crm_implementation Save the enquiry and set the original source.
2 Nov newsletter demo_invite Save a new enquiry and update the latest tagged campaign.
10 Nov No campaign captured None Save a third enquiry with campaign fields empty.

After the third submission, the original source is still linkedin, and the latest tagged campaign is still demo_invite. The latest enquiry itself has no captured campaign.

Avoid labeling that third enquiry as direct simply because the UTMs are missing. The record establishes that campaign data was unavailable. It does not establish how the visitor arrived.

Make the update safe to retry

When the backend accepts an enquiry, save the attribution snapshot with its stable submission ID. Use that same ID when delivering the enquiry to the CRM. A retry should reuse the existing enquiry record, while a new request from the same person should create a new one.

Compare acceptance times when updating the contact’s latest tagged campaign. A delayed delivery of the October enquiry should leave the November campaign in place. Where two updates can run concurrently, use a conditional update or serialize them for that contact so an older value cannot win.

Apply the same care to imports and backfills. If you discover an earlier accepted enquiry, route the change through a documented correction process so historical reports remain explainable.

Verify what each report counts

A contact acquisition report can group contacts by original enquiry source. A campaign response report can group individual enquiries by their captured campaigns. The same person can appear once in the first report and several times in the second.

Test a tagged first enquiry, a tagged repeat enquiry, an untagged repeat, a duplicate delivery, and an older delivery that arrives late. Inspect the contact summary and the individual enquiry records. The integration works when you can still answer both questions: Where did this contact first enquire, and which campaign was captured for this specific request?

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.