Skip to content
Identify

Link payments to visits with identify

3 min read · Updated · By the Reveata team

Revenue attribution works best when the checkout carries the visitor id. But people sign up on a laptop and pay on their phone, buy from a link in an email, or pay through a checkout you can't add metadata to. Those payments arrive without a visitor id, and without help they stay unattributed: counted in your revenue, but in no channel.

Identify is that help. When a signed-in person tells Reveata who they are, their payments can find their visits by user id or email.

How a payment finds its visitor

Reveata tries the strongest signal first and stops at the first match:

  1. The visitor id in the checkout metadata.
  2. The session id in the checkout metadata.
  3. The user id you sent with identify, matched to the most recently seen visitor with that user id.
  4. The email address, matched to the most recently seen visitor identified with that email.
  5. A visitor already linked to the same customer by an earlier payment.

Identify powers steps 3 and 4. See How revenue attribution works for the full rules.

Identify after sign-in

Call identify once the person is signed in, on every page load or right after sign-in:

js
reveata('identify', {
  userId: 'user_123', // your own stable id, required
  email: '[email protected]', // lets payments match by email
  name: 'Ada Lovelace',
});

Use the same userId everywhere. If your checkout lets you add metadata, add reveata_user_id with that id too, so the payment matches on step 3 without relying on email.

Late matches are fine

A payment can arrive before the visitor is identified, for example when someone pays first and creates their account afterwards. Reveata retries unattributed payments from the last 90 days every hour, so once the visitor is identified with the same email or user id, the payment is linked and credited to their visits, and its later renewals follow.

Browser identify or server identify

Anyone who can see your page can call identify from the browser console, because the tracking id is public. For most sites that is an acceptable risk. If it isn't for you, identify from your server instead, with a website API key, and turn off Match payments using browser identify calls in Site settings → Payments. Payments then only match identities your server confirmed.

bash
curl -X POST https://reveata.com/api/v1/websites/example.com/identify \
  -H "Authorization: Bearer $REVEATA_SITE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"visitorId":"k3j9x2m1p0qa","userId":"user_123","email":"[email protected]"}'

Cookieless websites

In cookieless mode there is no visitor id in the browser to pass to the checkout. Identify, by user id or email, is then the main way payments find their visits. See Cookieless analytics, explained.

Check your privacy policy

Identify links a person's name and email to their visits. Only do it when your privacy policy covers it. People can ask for their data or its deletion: see Visitor data requests.

Do it in Reveata

In the dashboard

  1. Open Site settings → Payments. Under How revenue is counted, a line tells you how many recent payments had no visitor ID; Recent payments shows which ones.
  2. Open Goals and funnels and choose User to list the visitors you identified, then open a profile to check its payments.

With the API

List the payments that are still unattributed (credential with payments:read):

bash
curl -G https://reveata.com/api/v1/websites/example.com/payments \
  -H "Authorization: Bearer $REVEATA_TOKEN" \
  --data-urlencode "attributed=false" \
  --data-urlencode "limit=50"

With an AI assistant

With the MCP server connected, ask:

Use list_payments with attributed set to false to show my unattributed payments from this month, and tell me which providers they came from.

Try it in your dashboardOpen your website in Reveata and follow the steps above with your own numbers.
Open dashboard →
Was this guide useful?

Next guides