Endpoint
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 goalGoal.Pageview- Pageview goalGoal.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, GBPobject
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 successfully401 Unauthorized- Missing or invalid API token
Examples
List All Goals
List Goals with Pagination
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_propsfield is always present but may be an empty object
Related Endpoints
- Create Goal - Create a new goal
- Delete Goal - Remove a goal