trackrv0.3.0trackr.casoon.de

← All examples

Custom event with personal data

A track() call whose path and properties contain an email address. Properties with a PII key name are replaced by [redacted], email addresses inside string values and URL paths are redacted, numbers stay as they are.

Custom event with personal data

examples/output/event.json
{
  "headers": {
    "content-type": "application/json",
    "user-agent": "Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.144 Mobile Safari/537.36",
    "accept-language": "en-US,en;q=0.9",
    "x-forwarded-for": "198.51.100.7"
  },
  "body": {
    "type": "event",
    "name": "signup_click",
    "url": "/users/jane@example.com/settings",
    "props": {
      "plan": "pro",
      "email": "jane@example.com",
      "note": "reply to jane@example.com",
      "seats": 3
    },
    "ts": 1791961260000
  }
}
{
  "response": {
    "status": 200,
    "body": "OK"
  },
  "stored": [
    {
      "type": "event",
      "name": "signup_click",
      "url": "/users/[redacted]/settings",
      "props": {
        "plan": "pro",
        "email": "[redacted]",
        "note": "reply to [redacted]",
        "seats": 3
      },
      "ts": 1791961260000,
      "sessionId": "6a903f454a1bbf75",
      "device": "mobile",
      "browser": "Chrome",
      "os": "Android"
    }
  ]
}
  • track
  • sanitizeProps
  • stripPii