Quick answer
Data matching compares records within or across sources to decide whether they describe the same real-world entity, such as one customer. Deterministic matching needs exact agreement on an identifier; fuzzy and probabilistic matching score similarity across fields and use thresholds.
Formula: Similarity = 1 − edit distance ÷ length of the longer string; pair score = sum of log₂(m ÷ u) for agreeing fields and log₂((1 − m) ÷ (1 − u)) for disagreeing ones
What is data matching?
Data matching is the process of comparing records, within one source or across several, to decide whether they describe the same real-world thing: the same person, company, product or address. It is also called record linkage or entity resolution. The output is a decision for each pair of records: match, non-match, or possible match that a person should review.
The reason it exists is that real data rarely carries one perfect shared key. The same customer is "Jon Smith" in the shop, "John Smith" in the support tool and "smith, john" in a spreadsheet. If you cannot decide they are one customer, you count three customers, send three emails and measure one person as three. Matching is the step that restores the single customer, and it comes before most other analysis. For the broader idea of tying identities together across devices and systems, see identity resolution, and for combining sources into one view, data unification.
What is deterministic matching?
Deterministic matching links two records only when a chosen identifier, or a chosen combination of fields, agrees exactly. A rule might read: "same email address after lower-casing", or "same phone number and same postcode". There are no scores and no grey area: either the rule fires or it does not.
Its strengths follow from that. It is fast, easy to explain and audit ("these two were linked because the email matched"), and it produces very few false matches when the identifier is reliable. Its weakness is the mirror image: one typo, one extra space or one missing field breaks the link, so it misses real matches whenever the data is untidy. It also fails when no single field is reliable, since a name alone is not unique.
Normalise before you compare. Lower-case emails, strip spaces and dashes from phone numbers, trim whitespace, and unify date formats. Many "failures" of deterministic matching are really failures to normalise first.
What are fuzzy and probabilistic matching?
Fuzzy matching tolerates differences: it scores how similar two values are and links them if the score passes a threshold. Probabilistic matching goes one step further and combines evidence from several fields into one overall score.
The basic tool for text is edit distance, the number of single-character insertions, deletions and substitutions needed to turn one string into another; Navarro's survey of approximate string matching covers it and its variants. A common similarity score is:
Similarity = 1 − edit distance ÷ length of the longer string
The formal model for combining fields is the one Ivan Fellegi and Alan Sunter published in 1969 in the Journal of the American Statistical Association, built on classical hypothesis testing. For each field, you estimate two probabilities: m, the chance the field agrees when the pair is a true match, and u, the chance it agrees by coincidence when the pair is not a match. An agreeing field adds log₂(m ÷ u) to the pair's score and a disagreeing one adds log₂((1 − m) ÷ (1 − u)), which is negative. The total is compared with two thresholds, giving three outcomes: link, possible link for review, and non-link.
What does a match example look like?
Five sample pairs, compared by exact match and by fuzzy similarity with a threshold of 0.85. The edit distances and similarities are computed from the two strings as written.
| Record A | Record B | Exact match | Edit distance | Similarity | Fuzzy at 0.85 |
|---|---|---|---|---|---|
| jon smith | john smith | No | 1 | 0.90 | Match |
| katherine | catherine | No | 1 | 0.89 | Match |
| ana lopez | ann lopes | No | 2 | 0.78 | No match |
| acme corp | acme corporation | No | 7 | 0.56 | No match |
| smith, john | john smith | No | 10 | 0.09 | No match |
Three lessons sit in the table. Two spelling variants of a name (rows 1 and 2) are caught by fuzzy matching and missed by exact. Row 3 shows a near miss that a stricter or looser threshold would flip, which is why thresholds need testing on labelled pairs. Rows 4 and 5 are different problems: "corp" versus "corporation" is a known abbreviation, and "smith, john" is the same name in a different order. Edit distance cannot see either, so they need standardising (expand abbreviations, reorder name parts) before comparing.
Now the weighted version. Sample probabilities for four fields: email (m = 0.95, u = 0.0001), surname (0.90, 0.01), birth date (0.92, 0.003), postcode (0.85, 0.02).
| Field | Weight if it agrees | Weight if it disagrees |
|---|---|---|
| 13.21 | −4.32 | |
| Surname | 6.49 | −3.31 |
| Birth date | 8.26 | −3.64 |
| Postcode | 5.41 | −2.71 |
Three pairs, scored by adding the weights, with a match threshold of 15 and a non-match threshold of 0 (sample values; real thresholds come from error-rate targets):
- Pair 1, all four agree: 13.21 + 6.49 + 8.26 + 5.41 = 33.38. Above 15: link.
- Pair 2, surname and birth date agree, postcode and email disagree: 6.49 + 8.26 − 2.71 − 4.32 = 7.72. Between 0 and 15: possible match, send to review.
- Pair 3, only the email agrees: 13.21 − 3.31 − 3.64 − 2.71 = 3.56. Also in the review band, even though the email, the strongest field, agreed.
The rare agreement, email, carries the most weight, because two different people almost never share one. Common agreement, like a postcode, adds little.
How do you choose between the approaches?
Use deterministic matching where you have a trustworthy shared identifier, fuzzy or probabilistic matching where you do not, and combine them. Judge the choice by two error rates. Precision is the share of links that are right; recall is the share of true matches found.
Sample data: a test set of 1,000 true duplicate pairs.
| Approach | Links found correct | Wrong links | Precision | Recall |
|---|---|---|---|---|
| Deterministic only | 810 | 3 | 99.6% | 81.0% |
| Fuzzy only (threshold 0.85) | 930 | 40 | 95.9% | 93.0% |
| Deterministic first, then fuzzy with review | 960 | 22 | 97.8% | 96.0% |
Deterministic finds few matches but is rarely wrong, fuzzy finds more but links some people who are different, and the combination is a compromise with a human review step for borderline pairs. Which trade-off is right depends on the cost of each error: wrongly merging two customers can send one person another's data, which is usually worse than leaving a duplicate.
What are common mistakes in data matching?
Five come up again and again.
- Skipping normalisation. Compare after lower-casing, trimming and unifying formats.
- Matching on a weak key. A name alone, or a common postcode, produces false links.
- One threshold for all time. Check it on labelled pairs each time the data changes.
- No review band. Forcing every pair into match or non-match hides the uncertain cases.
- Merging with no undo. Keep the log of which records were joined and why, so a wrong merge can be split.
How does TapCub match data?
TapCub matches people deterministically, on an ID you provide, not on fuzzy names. That is the right choice here, because the ID you control is more reliable than names.
- When a user logs in, your site calls
tapcub.login(id). The first time a device binds to a login ID, that session and the device's earlier anonymous events receive the user's ID. - Before comparing, TapCub normalises the ID as the docs describe: email is lower-cased and hashed, and mobile numbers have spaces and dashes removed. The same normalise-then-match rule from above, applied for you.
- A person who uses a phone and a laptop is merged into one person once both devices log in with the same ID. Open All-platform analytics › Users › Identity map to see people, bound devices and the difference between visitor, device and person counts, and to check the mapping log for binds, splits, rejections and backfills.
- Owners and admins can split a device from a person or unbind an identifier, which is the "undo" that mistake 5 calls for.
TapCub does not fuzzy-match names or merge visitors who never log in: anonymous visitors do not get a profile or join segments. Identified mode needs the Pro plan or above, and there is no console switch yet: contact support to turn it on.
Sources
- Fellegi, I. P. and Sunter, A. B. (1969), A Theory for Record Linkage, Journal of the American Statistical Association 64(328), 1183–1210. Checked 2026-11-22 (bibliographic details).
- Navarro, G. (2001), A guided tour to approximate string matching, ACM Computing Surveys 33(1), 31–88. Checked 2026-11-22 (bibliographic details).
Was this explanation clear?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Data Analyst
Explores traffic sources, conversion funnels, and retention, using clear metric definitions and concrete examples to explain what the numbers mean.