TapCub is live — analytics, insights and live chat, free on one platform
Glossary

What is data matching? Deterministic vs fuzzy matching with examples

Data matching decides whether records describe the same real-world thing. Deterministic and fuzzy matching, five pairs with edit distances, a weighted scoring example, precision and recall, and how TapCub binds logins.

Su He Reviewed by Ethan Brooks Also called record linkage Last updated Nov 22, 2026 Glossary

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 ARecord BExact matchEdit distanceSimilarityFuzzy at 0.85
jon smithjohn smithNo10.90Match
katherinecatherineNo10.89Match
ana lopezann lopesNo20.78No match
acme corpacme corporationNo70.56No match
smith, johnjohn smithNo100.09No 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).

FieldWeight if it agreesWeight if it disagrees
Email13.21−4.32
Surname6.49−3.31
Birth date8.26−3.64
Postcode5.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.

ApproachLinks found correctWrong linksPrecisionRecall
Deterministic only810399.6%81.0%
Fuzzy only (threshold 0.85)9304095.9%93.0%
Deterministic first, then fuzzy with review9602297.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.

  1. Skipping normalisation. Compare after lower-casing, trimming and unifying formats.
  2. Matching on a weak key. A name alone, or a common postcode, produces false links.
  3. One threshold for all time. Check it on labelled pairs each time the data changes.
  4. No review band. Forcing every pair into match or non-match hides the uncertain cases.
  5. 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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

Was this explanation clear?

We use your answers to fix and expand this page.

Su He

Data Analyst

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

FAQ

Questions people ask

Short answers to the follow-up questions that come up most.

Still have a question?

Chat with the team behind TapCub — we usually reply within a few hours on business days.

What is the difference between deterministic and fuzzy matching?

Deterministic matching links records only when an identifier, or a chosen set of fields, agrees exactly, which is precise but misses typos. Fuzzy matching scores similarity and links pairs above a threshold, which finds more true matches and also some false ones.

What is an example of data matching?

Linking the shop record Jon Smith with the support record John Smith. The edit distance is 1, so the similarity is 1 − 1 ÷ 10 = 0.90, above a 0.85 threshold, and the pair is linked. An exact match would have missed it.

Why do you normalise data before matching?

Many mismatches are formatting differences, such as capital letters, spaces or date formats. Lower-casing emails, stripping spaces and dashes from phone numbers and unifying dates makes equal values identical, so exact rules find them and fuzzy scores are not wasted on them.

How accurate is data matching?

It depends on the data and the thresholds. In the sample test set of 1,000 true pairs, deterministic matching had 99.6% precision and 81.0% recall, fuzzy matching 95.9% and 93.0%, and a combination with review 97.8% and 96.0%. Measure both on labelled pairs from your own data.

See this number on your own site

Add one script tag for web and apps, and the first reports fill in within minutes.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics