Installez notre application 🪄 Cliquez sur l'icône en haut à droite de la barre d'adresse.

Goals

GET https://analyticse.com/api/goals/
curl --request GET \
--url 'https://analyticse.com/api/goals/' \
--header 'Authorization: Bearer {api_key}' \
Paramètres Détails Description
website_id Optionnel Entier
type Optionnel Chaîne Valeurs autorisées : pageview, custom, scroll
search Optionnel Chaîne La chaîne de recherche.
search_by Optionnel Chaîne Quel champ recherchez-vous ? Les valeurs autorisées sont : name, path, key.
datetime_field Optionnel Chaîne Valeurs autorisées : datetime, last_datetime
datetime_start Optionnel Chaîne Date de début
datetime_end Optionnel Chaîne Date de fin
order_by Optionnel Chaîne Quel champ pour trier les résultats. Les valeurs autorisées sont : goal_id, last_datetime, datetime, name, path, key, scroll_percentage.
order_type Optionnel Chaîne L'ordre des résultats. Les valeurs autorisées sont : ASC pour un ordre croissant, et DESC pour un ordre décroissant.
page Optionnel Entier Le numéro de page dont vous souhaitez obtenir les résultats. Par défaut, c'est 1.
results_per_page Optionnel Entier Combien de résultats souhaitez-vous par page ? Les valeurs autorisées sont : 10, 25, 50, 100, 250, 500, 1000. Par défaut, c'est 25.
{
    "data": [
        {
            "id": 1,
            "website_id": 1,
            "user_id": 1,
            "key": "123456789",
            "type": "custom",
            "path": null,
            "scroll_percentage": null,
            "name": "Example",
            "last_datetime": null,
            "datetime": "2026-09-12 00:49:03"
        }
    ],
    "meta": {
        "page": 1,
        "total_pages": 1,
        "results_per_page": 25,
        "total_results": 1
    },
    "links": {
        "first": "https://analyticse.com/api/goals?page=1",
        "last": "https://analyticse.com/api/goals?page=1",
        "next": null,
        "prev": null,
        "self": "https://analyticse.com/api/goals?page=1"
    }
}
GET https://analyticse.com/api/goals/{goal_id}
curl --request GET \
--url 'https://analyticse.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "website_id": 1,
        "user_id": 1,
        "key": "123456789",
        "type": "custom",
        "path": null,
        "scroll_percentage": null,
        "name": "Example",
        "last_datetime": null,
        "datetime": "2026-09-12 00:49:03"
    }
}
POST https://analyticse.com/api/goals
Paramètres Détails Description
website_id Requis Entier -
type Requis Chaîne Valeurs autorisées : pageview, custom, scroll
name Requis Chaîne -
path Optionnel Chaîne Disponible quand : type = pageview, scroll
scroll_percentage Optionnel Entier Disponible quand : type = scroll
key Optionnel Chaîne -
curl --request POST \
--url 'https://analyticse.com/api/goals' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'website_id=1' \
--form 'name=Example' \
--form 'type=scroll' \
--form 'path=blog/*' \
--form 'scroll_percentage=75' \
{
    "data": {
        "id": 1,
        "website_id": 1,
        "user_id": 1,
        "key": "123456789",
        "type": "scroll",
        "path": "/blog/*",
        "scroll_percentage": 75,
        "name": "Example",
        "last_datetime": null,
        "datetime": "2026-09-12 00:49:03"
    }
}
POST https://analyticse.com/api/goals/{goal_id}
Paramètres Détails Description
website_id Optionnel Entier -
type Optionnel Chaîne Valeurs autorisées : pageview, custom, scroll
name Optionnel Chaîne -
path Optionnel Chaîne Disponible quand : type = pageview, scroll
scroll_percentage Optionnel Entier Disponible quand : type = scroll
key Optionnel Chaîne -
curl --request POST \
--url 'https://analyticse.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=scroll' \
--form 'path=blog/*' \
--form 'scroll_percentage=75' \
{
    "data": {
        "id": 1,
        "website_id": 1,
        "user_id": 1,
        "key": "123456789",
        "type": "scroll",
        "path": "/blog/*",
        "scroll_percentage": 75,
        "name": "Example",
        "last_datetime": "2026-09-12 00:49:03",
        "datetime": "2026-09-12 00:49:03"
    }
}
DELETE https://analyticse.com/api/goals/{goal_id}
curl --request DELETE \
--url 'https://analyticse.com/api/goals/{goal_id}' \
--header 'Authorization: Bearer {api_key}' \