Overview
This endpoint allows you to send event data to Cometly for tracking conversions, page views, and other user interactions. Events are processed asynchronously and will be queued for processing.
Request Body
Identification Requirements
At least one of the following identification methods is required:
- Email: User’s email address
- Comet Token: Cometly tracking token
- Fingerprint + IP: Both fingerprint and IP address must be provided together
The name of the event being tracked. Use one of the standard events or a configured custom event.Standard Events:
lead_generated
view_content
schedule
purchase
subscribe
add_to_cart
contact
initiate_checkout
add_payment_info
complete_registration
start_trial
sign_up
submit_application
webinar_registration
Custom Events:
Custom events are named custom_event_1 through custom_event_50. View our help article to learn how to configure custom events prior to sending to Cometly.
Tracking Parameters
User’s email address. Can be used as the primary identification method.
Cometly tracking token. Can be used as the primary identification method.
Browser fingerprint for user identification. Must be provided together with ip.
User’s IP address. Must be provided together with fingerprint.
Custom tracking identifier. Events with the same tracking_id will be attributed to the same contact.
Browser user agent string
Timestamp of when the event occurred. Accepts ISO 8601 format or Unix timestamp in seconds.
The URL where the event occurred
Ecommerce Data
Transaction amount (for purchase events)
Unique order identifier. This field is used in our deduplication logic — if multiple events are sent with the same order_id, they may be treated as duplicates. Ensure each distinct order uses a unique value.
Order name or description
Indicates if this is an upsell transaction
Common identifier linking upsells to original orders
Attribution Parameters
Traffic source (e.g., “google”, “facebook”)
Campaign name or identifier
Ad group name or identifier
Keyword that triggered the ad
Traffic type (e.g., “cpc”, “organic”)
Custom Fields
profile_field_1 ... profile_field_30
Custom profile field values passed as root-level properties. Fields 1-15 accept text, 16-25 accept numbers, 26-30 accept dates.Example: "profile_field_1": "Enterprise", "profile_field_16": "500"
Advanced Options
Unique key to prevent duplicate event processing. Use this to safely retry requests.
Set to true to prevent this event from being sent to Conversions API integrations
Response
Success Response
Success message indicating the event was queued
Error Response
Error description explaining what went wrong
Example Requests
curl -X POST https://app.cometly.com/public-api/v1/events/track \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"event_name": "purchase",
"email": "customer@example.com",
"amount": 99.99,
"order_id": "ORD-12345",
"url": "https://example.com/checkout/success",
"event_time": "2024-01-15T10:30:00Z"
}'
Status Codes
| Status Code | Description |
|---|
| 202 | Event accepted and queued for processing |
| 401 | Missing or invalid API key |
| 403 | API key doesn’t have permission or subscription is inactive |
| 422 | Validation failed or missing required parameters |
| 429 | Too many requests - rate limit exceeded. See Rate Limiting |
Notes
- Rate Limit: This endpoint has a limit of 1000 requests per minute per Space. See Rate Limiting for details.
Validation Rules
- At least one identification method must be provided:
email, OR
comet_token, OR
- Both
fingerprint AND ip together
event_name is required
- If
fingerprint is provided, ip must also be provided (and vice versa)
event_time accepts ISO 8601 format or Unix timestamp in seconds
amount must be a number if provided
The idempotency_key in our API is a unique identifier that ensures data consistency and prevents duplication of events. You can extract the event_id from the Meta browser pixel and use it as the idempotency_key when interacting with our API. Upon an attributed Meta ad conversion event, we will send this value as event_id to prevent duplication, enabling Meta to recognize the event_id and deduplicate browser events.
Use the idempotency_key parameter to safely retry requests without creating duplicate events. The same idempotency key will prevent the event from being processed multiple times.