Security and privacy
How Product Metrics handles consent, customer data, access for the MCP server and CLI, secrets, erasure and cookies.
Product Metrics reads your customers’ orders from your shop, and its tracking sends them to Google Ads, Meta and ChatGPT Ads. This page covers what it sends, when, who can reach it, and how data is removed.
At a glance
| Topic | How it works |
|---|---|
| Consent | Starts denied. Your cookie banner is read as the four Consent Mode v2 signals, per visitor. |
| Customer data | Email, phone, name and postcode are hashed with SHA-256 before they are sent, and only with consent. |
| Source of orders | Your shop’s own order data. Only paid orders are sent. |
| Access | OAuth sign-in for the app, the MCP server and the CLI. No API keys. Your role applies everywhere. |
| Secrets | Setup tokens and store credentials never reach an AI assistant. |
| Erasure | A privacy request erases the customer’s records and takes them out of your Google Ads customer lists. |
| Cookies | First-party, on your store’s own domain. |
Consent first
Product Metrics follows the choice each visitor makes in your cookie banner. Consent starts denied, and getting through ad blockers never overrides it.
The tracking script reads your banner (Shopify Customer Privacy, OneTrust, Cookiebot, Usercentrics or Osano, per store) as the four Consent Mode v2 signals: ad_storage, ad_user_data, ad_personalization and analytics_storage. When the order is confirmed, those signals decide what may go to each channel:
| Visitor allowed | Google Ads | Meta | Customer lists |
|---|---|---|---|
| Nothing | Order sent without customer data or click | Nothing sent | Not added |
| Ad user data | Order with hashed customer data | Events sent | Not added |
| Ad user data + ad storage | Order with customer data and the ad click | Events plus _fbp and _fbc | |
| Ad user data + ad personalisation | Added to Google Ads lists |
A visitor who withdraws consent after checkout: the order isn’t sent. A store with a banner that isn’t configured is treated as no consent. Details: Consent; setup: Choose your consent banner.
Customer data is hashed
With each paid order, and only when the visitor allowed ad user data, Product Metrics adds the customer’s email, phone, name and postcode, hashed with SHA-256. The ad platform matches the hash to the person who clicked; it never receives the plain values.
| Field | Google Ads | Meta |
|---|---|---|
| Email, phone | Hashed | Hashed |
| Name, country, postcode | Hashed, only as a complete set | Hashed |
| Your shop’s customer ID | Not sent | Hashed, as external_id |
| IP address and user agent | Not sent | Sent unhashed: Meta requires them |
Customer lists send the same hashed fields through Google’s Data Manager. When Product Metrics matches a customer to their earlier orders to tell new from returning, email and phone are hashed first. See Enhanced Conversions and Customer lists.
Data comes from your own shop
- Orders are read from your store platform’s own order data, not trusted from the browser. Only orders your platform marks paid are sent; refunds adjust Google Ads conversions later.
- Costs come from your platform’s cost prices, your Merchant Center cost of goods, or the costs you enter. See Profit.
- Google data (Google Ads, Merchant Center, your Google profile and email) is reached through OAuth, limited to the scopes those features need.
Access: OAuth for the MCP server and the CLI
The MCP server (https://www.productmetrics.io/mcp) and the productmetrics CLI sign in through the same OAuth server, with PKCE. There is no API key to copy or leak.
You approve each client once on the Product Metrics consent page, which lists what it Can read and Can change.
| Scope | Allows |
|---|---|
mcp | The MCP analysis tools: reading, and filing proposals a person approves |
read | Reading your setup and data |
setup | Connecting accounts and stores, completing setup steps, removing connections |
write | Changing settings, product rules and feeds, and inviting people |
- Scopes never widen your role. A client acts as you, with your role in each workspace. An operation that needs a workspace admin still fails for an editor.
- Access is checked on every request. Lose access to a workspace and every client loses it at once.
- Token lifetimes: access token one hour, refresh token 30 days. The refresh token rotates each time it is used.
- Destructive operations need you. Through the MCP server, an operation that deletes something runs only after you agree. A Code Mode run makes at most 25 requests.
- CLI credentials live in
${XDG_CONFIG_HOME:-~/.config}/product-metrics/credentials.json, file mode0600in a0700directory, one entry per API origin.productmetrics logoutrevokes the tokens and removes the entry.
# signed in, scopes, token expiry; never calls the API
productmetrics status --json
productmetrics login --scopes read
productmetrics logoutDetails: CLI authentication, Connect your assistant.
Secrets
Some setup steps return a secret: the one-time setup token you paste into the WooCommerce or Shopware plugin, for example.
- Through the MCP server, secret fields never reach the assistant. They come back as
<hidden: shown only in the Product Metrics app or CLI>, and the assistant tells you where to find them. - In the CLI, secret fields print as
<hidden: pass --show-secrets>. Pass--show-secretsonly to show the value to the person who pastes it. - Setup tokens are one-time and expire at
expiresAt. If one expires, create a new one (productmetrics stores create-woocommerce-setup-claim). - Lightspeed API keys are credentials you enter yourself. An assistant must never invent, reuse or repeat them.
Erasure
- Customer requests. On Shopify, the
customers/redactprivacy webhook starts an erasure. Before anything is deleted, the customer leaves every Google Customer Match list. Then their orders, identity records and pending sends are erased, and their unsent events are never sent. - Uninstalling. Shopify’s
shop/redactwebhook erases the shop’s store data. - Your own data. To have your personal data deleted, including data reached through Google APIs, email support@productmetrics.io.
Cookies on your store’s domain
The tracking script runs on a unique endpoint on your own store domain, so its cookies are first-party: set by your store, readable only by your store.
_pm_id(visitor) and_pm_adc(the first ad click), with a session cookie the browser script can’t read (HttpOnly).- Meta’s
_fbpand_fbc, and the ChatGPT Ads (OpenAI) cookies__opprefand__obref, are written only when missing, so an existing pixel’s values are kept. - Ad click IDs travel with the order only when the visitor allowed ad storage.
- Under Safari ITP, standard tags’ cookies are cut to 7 days. The Product Metrics first-party cookie lasts 30 days.