Event ingestion happens through sensors that collect the events, and they all get into the queue. Then, when the cron starts (in loop-until-drained), it defines the entities that had actions since the last cron run, updates statistics, and calculates the context that is used by the active rules to determine a final risk score for each entity.
Use one of these:
| Language | Install |
|---|---|
| PHP | composer require tirreno/tirreno-tracker |
| Python | pip install tirreno_tracker |
| Node.js | npm install @tirreno/tirreno-tracker |
| WordPress | Upload the plugin to WordPress, activate it, then enter your Tracking ID and tirreno URL |
Repos: PHP, Python, Node.js, WordPress
|
Note: The API uses form-urlencoded format, not JSON.
Optional headers:
| Header | Description |
|---|---|
X-Request-Id | Trace ID (up to 36 characters) stored with the event, or with the rejected request if validation fails |
Command line: the sensor can also be called from the CLI, passing the Tracking ID and event fields as long options:
|
| Parameter | Description |
|---|---|
userName | Unique user ID (max 100 chars) |
ipAddress | IPv4/IPv6 address (invalid IPs default to 0.0.0.0) |
url | URL path (max 2047 chars) |
eventTime | UTC timestamp Y-m-d H:i:s.v; Y-m-d H:i:s and Y-m-d H:i:s.u are also accepted (an invalid value is replaced with the current UTC time) |
| Parameter | Type | Description |
|---|---|---|
emailAddress | string | Email address (max 255 chars). Validated and converted to lowercase |
userAgent | string | Browser UA (max 511 chars) |
firstName | string | User's first name (max 100 chars) |
lastName | string | User's last name (max 100 chars) |
fullName | string | User's whole name (max 100 chars) |
pageTitle | string | Title of visited page (max 255 chars) |
phoneNumber | string | User's phone number (max 19 chars) |
httpReferer | string | Referer HTTP header value (max 2047 chars) |
httpMethod | string | HTTP method: GET, POST, HEAD, PUT, DELETE, PATCH, TRACE, CONNECT, OPTIONS, LINK, UNLINK |
httpCode | string | HTTP response status code (must be numeric, defaults to 0) |
browserLanguage | string | Detected browser language (max 255 chars) |
eventType | string | One of the event types listed below. Defaults to page_view, or page_error if httpCode >= 400 |
userCreated | string | User creation timestamp (Y-m-d H:i:s or Y-m-d H:i:s.v) |
payload | array | Event details for page_search and account_email_change events |
fieldHistory | array | Field edit history for field_edit events |
Note: Maximum length for all other parameters is 100 characters unless specified above. Parameters exceeding max length are truncated.
Default: page_view (or page_error if httpCode >= 400)
| Type | Description |
|---|---|
page_view | Page visit (default) |
page_edit | Page modification |
page_delete | Page deletion |
page_search | Search query |
page_error | Error page |
account_login | User authentication |
account_logout | Session end |
account_login_fail | Failed login attempt |
account_registration | New account creation |
account_email_change | Email address change |
account_password_change | Password change |
account_edit | Account profile modification |
field_edit | Data modification |
For page_search events:
|
| Field | Required | Description |
|---|---|---|
field_id | Yes | Unique identifier for the search field |
value | Yes | The search query string |
field_name | No | Human-readable field name |
For account_email_change events:
|
| Field | Required | Description |
|---|---|---|
new_value | Yes | The new email address |
old_value | No | The previous email address |
Required for field_edit events. Must be an array of field change objects:
|
| Field | Required | Description |
|---|---|---|
field_id | Yes | Unique identifier for the field |
new_value | Yes | The new field value |
field_name | No | Human-readable field name |
old_value | No | The previous field value |
parent_id | No | Parent record ID (for nested data) |
parent_name | No | Parent record name |
Note: Missing required fields default to "unknown". All values are converted to strings.
| Response | Meaning |
|---|---|
| 204, no body | Event accepted |
| 200, empty body | Request rejected: missing or unknown Tracking ID, or a required field is missing. The reason is written to the web server error log |
| 429 | Rate limited (see Rate limiting) |
| 500 | Server error |
| 403 | Wrong endpoint, e.g., /sensor without the trailing slash |
Successful requests (2xx) return no response body.
The sensor has a leaky bucket rate limiter, applied per Tracking ID: at most LEAKY_BUCKET_RPS × LEAKY_BUCKET_WINDOW requests are accepted within the window (defaults: 10 requests per second, 20 seconds). Requests over the limit get 429 and appear in the Logbook as Rate limit exceeded. Setting either value to 0 disables the limit; see Environment variables for how to set them.
Check if an entity is blacklisted. The value is matched against entity IDs (userName) only; IP addresses, emails and phone numbers are not looked up.
Request:
|
Response:
|
The response is JSON. A missing or unknown Tracking ID returns 401.
The examples in this guide use $blacklistService->isBlacklisted($value) (blacklist_service.is_blacklisted() in Python, blacklistService.isBlacklisted() in Node.js). It stands for your own small wrapper that sends this request and returns the blacklisted field; define it before using the examples.
The Logbook statuses and columns are described in Logbook in the user guide.
________________________________________________________________________________