Conversions
Conversions are tracked as journey events with event_type: "conversion". Once ingested, query conversion summaries, timeseries, breakdowns, and time-to-convert analysis.
Track a conversion
Section titled “Track a conversion”Send a conversion event via the journey ingestion endpoint (requires the journey:write API key permission):
curl -X POST https://qck.sh/public-api/v1/journey/events \ -H "X-API-Key: qck_your_api_key_here" \ -H "Content-Type: application/json" \ -d '{ "events": [ { "link_id": "550e8400-e29b-41d4-a716-446655440000", "visitor_id": "user-123", "session_id": "sess-abc", "event_type": "conversion", "conversion_name": "purchase", "revenue_cents": 4999, "currency": "USD", "page_url": "https://example.com/thank-you" } ] }'Conversion fields
Section titled “Conversion fields”| Field | Type | Required | Description |
|---|---|---|---|
event_type | string | Yes | Must be "conversion" |
conversion_name | string | Yes | Name of the conversion (e.g. "purchase", "signup") |
revenue_cents | number | No | Revenue in cents ($49.99 = 4999) |
currency | string | No | ISO 4217 code: 3 uppercase letters (e.g. USD). Defaulted to USD only in webhook payloads; revenue totals are currency-agnostic |
All other journey event fields (link_id, visitor_id, session_id, page_url, etc.) apply as well. See Journey Tracking for the full field reference.
Query conversions
Section titled “Query conversions”Summary
Section titled “Summary”Aggregate conversion metrics across all links:
curl "https://qck.sh/public-api/v1/conversions/summary?period=30d" \ -H "X-API-Key: qck_your_api_key_here"Returns total conversions, unique converters, total revenue, average order value, and conversion rate.
Timeseries
Section titled “Timeseries”Conversion counts and revenue over time:
curl "https://qck.sh/public-api/v1/conversions/timeseries?period=30d&interval=day" \ -H "X-API-Key: qck_your_api_key_here"Intervals: hour, day, week, month.
Breakdown
Section titled “Breakdown”Break down conversions by dimension:
curl "https://qck.sh/public-api/v1/conversions/breakdown?period=30d&dimension=country" \ -H "X-API-Key: qck_your_api_key_here"Dimensions: device, country, link, name.
Time to convert
Section titled “Time to convert”How long from click to conversion:
curl "https://qck.sh/public-api/v1/conversions/time-to-convert?period=30d" \ -H "X-API-Key: qck_your_api_key_here"Returns distribution buckets, average seconds, and median seconds.
Filtering
Section titled “Filtering”All conversion endpoints support optional scope filters:
| Param | Description |
|---|---|
period | Time window: 24h, 7d, 30d, or 90d |
domain_id | Filter to a specific custom domain |
link_id | Filter to a specific link |