Goal conversions
GET https://trak.website/api/goals-conversions/
curl --request GET \
--url 'https://trak.website/api/goals-conversions/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://trak.website/api/goals-conversions/' \
--header 'Authorization: Bearer {api_key}' \
| Parameters | Details | Description |
|---|---|---|
| goal_id | Optional Integer | |
| website_id | Optional Integer | |
| order_by | Optional String | What field to order the results by. Allowed values are: conversion_id, datetime. |
| order_type | Optional String | The ordering of the results. Allowed values are: ASC for ascending ordering, and DESC for descending ordering. |
| page | Optional Integer | The page number that you want results from. Defaults to 1. |
| results_per_page | Optional Integer | How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250 , 500 , 1000. Defaults to 25. |
{
"data": [
{
"id": 1,
"website_id": 1,
"user_id": 1,
"visitor_id": 1,
"session_id": 1,
"event_id": 1,
"datetime": "2026-02-26 02:58:41"
},
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://trak.website/api/goals-conversions?page=1",
"last": "https://trak.website/api/goals-conversions?page=1",
"next": null,
"prev": null,
"self": "https://trak.website/api/goals-conversions?page=1"
}
}
GET https://trak.website/api/goals-conversions/{conversion_id}
curl --request GET \
--url 'https://trak.website/api/goals-conversions/{conversion_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://trak.website/api/goals-conversions/{conversion_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"website_id": 1,
"user_id": 1,
"visitor_id": 1,
"session_id": 1,
"event_id": 1,
"datetime": "2026-02-26 02:58:41"
}
}
POST https://trak.website/api/goals-conversions
| Parameters | Details | Description |
|---|---|---|
| goal_id | Required Integer | - |
| visitor_id | Optional Integer | Available when: tracking_mode = normal |
| session_id | Optional Integer | Available when: tracking_mode = normal |
| event_id | Optional Integer | Available when: tracking_mode = normal |
curl --request POST \
--url 'https://trak.website/api/goals-conversions' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'goal_id=1' \
--form 'visitor_id=1' \
--url 'https://trak.website/api/goals-conversions' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'goal_id=1' \
--form 'visitor_id=1' \
{
"data": {
"id": 1
}
}
POST https://trak.website/api/goals-conversions/{conversion_id}
| Parameters | Details | Description |
|---|---|---|
| website_id | Optional Integer | - |
| type | Optional String | Allowed values: pageview , custom |
| name | Optional String | - |
| path | Optional String | Available when: type = pageview |
| key | Optional String | - |
curl --request POST \
--url 'https://trak.website/api/goals-conversions/{conversion_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'is_enabled=0' \
--url 'https://trak.website/api/goals-conversions/{conversion_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'is_enabled=0' \
{
"data": {
"id": 1
}
}
DELETE https://trak.website/api/goals-conversions/{conversion_id}
curl --request DELETE \
--url 'https://trak.website/api/goals-conversions/{conversion_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://trak.website/api/goals-conversions/{conversion_id}' \
--header 'Authorization: Bearer {api_key}' \