# Analyze Customer Data Without Seeing Anyone | Storek

> Count customers, match orders to tickets and find repeat buyers without reading a single email address. Which protection to use for each kind of field.

Source: https://storek.io/blog/pii-masking-for-analytics

1.  [Home](https://storek.io/)
2.  [Blog](https://storek.io/blog)
3.  Analyze Customer Data Without Seeing Anyone

Platform how-to

# PII masking for analytics: when to mask, tokenize or block, and how joins and counts keep working

You need to count customers, join orders to tickets and find repeat buyers. You don't need to read anyone's email address to do it. Here's how the four actions differ and which to use where.

Storek teamJuly 29, 20254 min read

![Whiteboard in the neon look: repeat customers per month rising to 1,610 in October, counted on a tokenized email column, zero names shown, a donut of masked columns and a note that a token stands for the same shopper every month.](https://storek.io/blog/pii-masking-for-analytics/hero.webp)

Sample dataRepeat customers counted on masked identifiers. Illustrative data.

On this page

1.  [The four actions](#the-four-actions)
2.  [Why tokens keep the math right](#why-tokens-keep-the-math-right)
3.  [How to choose, column by column](#how-to-choose-column-by-column)
4.  [The same rules for every reader](#the-same-rules-for-every-reader)

Most analytics questions are about people in aggregate. How many customers bought twice this quarter? Which accounts opened more than three tickets? What share of returns come from the same few shoppers? Every one of those needs a personal-data column, usually an email or a customer ID, and not one of them needs anybody to read it.

That gap is what masking is for. Done well, it lets the numbers work while the people stay private.

## The four actions

There are four things you can do with a column that holds personal data. Storek applies one of them to each column it labels.

Action

What a reader sees

Joins and distinct counts

Use it for

Allow

The real value

Work

Columns that aren't personal, or that every reader may see

Mask

The shape: j\*\*\*\*\*\*\*@a\*\*\*.com, \*\*\*-\*\*-6789

Not on the masked text

Showing that a value exists without showing it

Tokenize

A stable stand-in, the same for the same value

Work

IDs and emails you need to count, match or join on

Block

Nothing; the column can't be read

No

Values no analysis needs, such as full card numbers

The four actions. Mask keeps the shape for people; tokenize keeps the matching for queries.

Here’s how one row of an orders export reads under each. The values are invented.

Column

Masked

Tokenized

Raw (only with a reveal grant)

email

j\*\*\*\*\*\*\*@a\*\*\*.com

tok\_7Q2M9B

hidden

phone

\*\*\*-\*\*\*-4410

tok\_K81D2X

hidden

customer\_id

C-\*\*\*\*\*\*-19

tok\_55RW0A

hidden

Sample dataThe same three values, masked and tokenized. The same email always becomes tok\_7Q2M9B, which is what lets a query count it.

## Why tokens keep the math right

A token is stable. The same email gets the same token every time it appears, in every table of the workspace. So anything that only needs to know whether two values are equal still works:

In Storek

You ask

“How many customers ordered more than once this month?”

What Storek did

-   counted orders per customer using the protected email, never the real one
-   kept only customers with two or more orders this month
-   masked every name and email in the result

The answer

You get the real repeat-customer count, and nobody ever sees an address.

Dig deeper: see how it works

The same email always becomes the same protected token, in every table, so counts and matches work exactly as they would on the raw value. Reveal stays off unless someone is allowed to see that field.

For analysts

```
-- Repeat customers this month, counted on the tokenized email
SELECT COUNT(*) AS repeat_customers
FROM (
  SELECT email_token
  FROM orders
  WHERE order_date >= DATE '2026-10-01'
  GROUP BY email_token
  HAVING COUNT(*) >= 2
);
```

That count comes out the same on tokens as it would on raw emails. Matching works the same way: orders and support tickets both carry the protected email, so “customers who ordered and then opened a ticket” is an ordinary question. The chart at the top of this page was counted exactly like this.

What a token can’t do is reveal anything about the value. You can’t filter on part of it (all addresses at one domain, say) unless that part lives in its own column, and you can’t sort or do arithmetic on it. For an ID or an email, that’s rarely a loss.

## How to choose, column by column

1.  ### Let detection find the columns first

    People miss personal data in exports: a phone number in a “notes” field, an email in “created\_by”. Storek detects it automatically in five layers: patterns with validators (such as the Luhn check for card numbers and IBAN checks), name detection, the column’s meaning, an entity-recognition model, and a language model for columns that are still unclear. It uses 35 label types.

2.  ### Tokenize anything you count or join on

    Customer IDs, emails, account numbers, member IDs. If a question will ever say “how many distinct” or “match to,” tokenize it.

3.  ### Mask what people need to see exists

    A support lead may need to see that a contact has an email on file without reading it. Masking keeps the shape so the value is recognizable as an email or a phone number.

4.  ### Block what no analysis needs

    Full card numbers and government ID numbers rarely belong in an analytics question. Block them. Storek fails closed: if it can’t apply the rule for a column, the column isn’t shown.

5.  ### Grant reveals to named people, per field

    Some roles need the real value: a payroll lead for a tax ID, a loss-prevention lead for a shopper. Storek’s reveal grants go per person and per field and are re-checked on every query. A clean-room lock turns every reveal off, admins included. The audit log records which labels were read and how many rows, never the raw values.

![Donut chart of 58 columns in an orders workspace by masking action: 41 allowed, 9 masked, 6 tokenized and 2 blocked.](https://storek.io/blog/pii-masking-for-analytics/column-actions.webp)

Sample dataColumns in an orders workspace, by action. Most columns aren't personal at all; the few that are carry most of the risk. Invented data.

## The same rules for every reader

Masking only helps if there’s no side door. In Storek, the rules apply wherever data is read: in chat, on dashboards, in tables and reports, and when someone connects Claude or another assistant through the read-only MCP connector. The assistant sees what the person who connected it is allowed to see, and nothing more.

About the examples

The company, people and figures in this article are illustrative.

## Sources

1.  [Regulation (EU) 2016/679 (GDPR), Article 4(5) and Recital 26](https://eur-lex.europa.eu/eli/reg/2016/679/oj/eng) · EUR-Lex · checked November 9, 2026

PrivacyData loading

## Keep reading

[Trust center**How Storek finds and seals personal data**Open the page →](https://storek.io/security)[Industry analysis**Spot Unusual Returns Without Seeing Shoppers**Read the article →](https://storek.io/blog/retail-return-patterns-tokenized)[Platform how-to**Bring Your AI Assistant to Company Data Safely**Read the article →](https://storek.io/blog/connect-claude-mcp-company-data)

FAQ

## Questions, answered.

What's the difference between masking and tokenization?

Masking hides most of a value but keeps its shape, like j\*\*\*\*\*\*\*@a\*\*\*.com, so a person can see that a value exists. Tokenization replaces the value with a stable stand-in, so the same email always becomes the same token and joins and distinct counts still work.

Is tokenized data still personal data?

Under the GDPR, generally yes. Recital 26 says pseudonymized data that could be attributed to a person with additional information should be treated as information about an identifiable person. Tokenizing lowers exposure inside your analytics; it doesn't take the data out of scope.

Can analysts still join tables on a protected column?

On a tokenized column, yes: equal values get equal tokens, so a join or a COUNT(DISTINCT) gives the same result as on the raw values. A masked column is for display, so join on its tokenized form instead.

Who can see the real values?

Only people with a reveal grant for that field. Grants are per person and per field, re-checked on every query, and can be revoked at any time. A clean-room lock turns all reveals off, admins included, and the audit log records labels and counts, never the raw values.

Book a demo

## See your own data, delivered.

30 minutes. Your data or our sample. No slide deck. Pick a time straight after the form.
