Understand users privately.
Use anonymous visitor activity by default and add a stable internal ID only when retention needs it.
1 Anonymous users need no call
The User view starts working as soon as the standard tracker receives traffic. Know shows short-lived anonymous aliases, source, coarse location, device, and last activity without revealing a person’s identity.
Pageviews, sessions, device context, and source populate the view with no additional application code.
Journey paths remain aggregated and only appear after at least three visitors follow the same route.
2 Identify only for retention
If the product has authenticated accounts, an opaque stable internal ID can connect return activity to a private retention cohort. It does not replace the anonymous alias with a name or e-mail address.
// Run after login succeeds and whenever a full page load restores the session.
window.know?.("identify", { userId: currentAccount.id });Strict privacy mode intentionally disables identified retention. Anonymous User analytics continues to work.
3 Verify safely
- Sign in with a non-production test account.
- Confirm the identify call runs after authentication, not before it.
- Reload a protected page and confirm the restored session runs the call once again.
- Inspect the payload and verify it contains only the opaque internal ID.
Give this task to ChatGPT
Sign in and select a website to replace all placeholders automatically.
Work in the codebase for https://YOUR_WEBSITE_DOMAIN.
Know configuration:
- Registered domain: YOUR_WEBSITE_DOMAIN
- Site ID: YOUR_SITE_ID
- Tracker: https://www.know.am/t.js
- Event collector: https://collect.know.am/e
- Configured goal events: none configured yet
Task: Add privacy-safe Know user identification for retention analysis.
Requirements:
1. Locate the canonical authenticated account or workspace object.
2. After login succeeds and whenever a full page load restores the session, call window.know?.("identify", { userId: stableInternalId }).
3. Use an opaque immutable database ID. Never derive the ID from an e-mail address, name, phone number, device, IP address, or browser storage.
4. Do not identify anonymous visitors and do not expose an individual activity timeline.
5. If the product has no authenticated accounts, make no code change and report that Know's anonymous User view already works automatically.
Privacy and implementation rules:
- Inspect the project and find the real successful application state before editing.
- Keep the existing Know tracker installed exactly once; do not add another analytics package.
- Never send names, e-mail addresses, credentials, authorization data, payment-card data, health data, cookies, raw IP addresses, query strings, or request bodies.
- Preserve the current design, authentication, redirects, middleware, and server/client boundaries.
- Run the existing tests and production build, then report changed files and exact verification steps.
Make the code changes now.