record_impression
Record a single ad impression from a device.
WHEN TO USE:
Reporting that an ad was displayed on a device
Recording impression with detailed metadata
Single impression events (for batch, use batch_impressions)
RETURNS:
success: Boolean indicating success
impression_id: Unique impression identifier
earnings: Earnings credited for this impression
EXAMPLE: User: "Record an impression for ad 507f1f77bcf86cd799439011" record_impression({ fingerprint: "P_abc123", ad_id: "507f1f77bcf86cd799439011", duration_seconds: 15 })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ad_id | Yes | Advertisement ID (MongoDB ObjectId) | |
| metadata | No | Additional impression metadata | |
| timestamp | No | ISO 8601 timestamp when impression occurred (optional, defaults to now) | |
| fingerprint | Yes | Device fingerprint (e.g., "P_abc123") | |
| duration_seconds | No | How long the ad was displayed (seconds) |