Use one of these:
| Language | Install |
|---|---|
| PHP | composer require tirreno/tirreno-tracker |
| Python | pip install tirreno_tracker |
| Node.js | npm install @tirreno/tirreno-tracker |
|
Note: The API uses form-urlencoded format, not JSON.
| 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 | Timestamp Y-m-d H:i:s.v (defaults to current UTC if invalid) |
| 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 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 |
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.
Check if a user or IP is blacklisted:
Request:
|
Response:
|
HTTP status codes returned by the API:
| HTTP Code | Cause |
|---|---|
200 | Success (no response body) |
400 | Required field missing or invalid format |
401 | Api-Key header missing or API key not found |
429 | Rate limit exceeded |
500 | Internal server error |
503 | Database unavailable |
Validation error response (400):
|
Note: Successful requests (200) return no response body.
The Logbook page in tirreno dashboard tracks all API requests with these status codes:
| Status | Description |
|---|---|
| Success | Event recorded successfully |
| Validation warning | Event recorded with field corrections (e.g., truncated values) |
| Critical validation error | Event rejected due to missing required fields |
| Critical error | Server error, event not recorded |
| Rate limit exceeded | Request rejected due to rate limiting |
________________________________________________________________________________