Skip to main content

Endpoint

Retrieves a paginated list of all goals configured for your site. Goals are returned in descending order by ID (newest first).

Authentication

Requires a Plugins API token with read access.
string
required
Bearer token for authentication

Query Parameters

integer
default:"10"
Maximum number of goals to return per pageMaximum: 1000 (also the maximum total goals per site)
string
Cursor value for forward paginationReturned in the pagination metadata of the previous response.
string
Cursor value for backward paginationReturned in the pagination metadata of the previous response.

Response

array
Array of goal objects
string
Type of goalValues:
  • Goal.CustomEvent - Custom event goal
  • Goal.Pageview - Pageview goal
  • Goal.Revenue - Revenue goal (Business plan)
integer
Unique identifier for the goal
string
Human-readable display name
  • For custom events: same as event_name
  • For pageviews: “Visit
string
Event name (for custom event and revenue goals only)
string
Page path (for pageview goals only)
string
Currency code (for revenue goals only)Examples: USD, EUR, GBP
object
Custom properties filter configuration (if any)
object
Pagination metadata
string
Cursor for fetching the next page (null if no more pages)
string
Cursor for fetching the previous page (null if on first page)
integer
The limit used for this request

Status Codes

  • 200 OK - Goals retrieved successfully
  • 401 Unauthorized - Missing or invalid API token

Examples

List All Goals

Response:

List Goals with Pagination

Response:

Fetch All Goals (Iterating Pages)

Goal Types

Custom Event Goal

Pageview Goal

Revenue Goal (Business Plan)

Goal with Custom Properties

Notes

  • Goals are returned in descending order by ID (newest first)
  • Maximum 1,000 goals per site
  • Use pagination for sites with many goals
  • Goals with custom properties require the Props feature
  • Revenue goals are only available on the Business plan
  • The custom_props field is always present but may be an empty object