v4

latestOpenAPI 3.0.02026-08-04109113304.5 KB
Events

List all Events

Get all Events for a Project. This endpoint lists all types of Events including Pageview Events which are stored as Pages. You can also get Goal objects from Optimizely Classic by setting the include_classic parameter to true.

get/events

Query parameters

per_pageinteger

Optional pagination argument that specifies the maximum number of objects to return per request

pageinteger

Optional pagination argument that specifies the page to return. If you have 140 objects and you choose to return 100 objects per page you will be able to access the last 40 objects on page 2. The default value is 1.

project_idinteger required

The ID of the Project you would like to list all Events for

include_classicboolean

Whether or not to include classic Events in the list of Events. If this parameter is not provided it will default to false

skip_viewsboolean

Whether or not to skip Pageview Events in the list of Events. If this parameter is not provided it will default to false

Response

List of Events for the supplied Project ID

archivedboolean

Whether or not this Event is archived

category'add_to_cart' | 'save' | 'search' | 'share' | 'purchase' | 'convert' | 'sign_up' | 'subscribe' | 'other'
createdstring date-time

Creation date for this Event

descriptionstring

A description for this Event

event_type'custom' | 'click' | 'pageview' | 'classic_custom' | 'classic_click' | 'classic_pageview' | 'classic_engagement' | 'classic_revenue' | 'classic_mobile_tap' | 'classic_mobile_view' | 'classic_mobile_session_length' | 'classic_mobile_num_session'

The type of this Event

experiment_countinteger

Number of experiments that reference this Event across all statuses (running, paused, draft, archived). Computed by the upstream service.

idinteger

The unique identifier of the Event

is_classicboolean

Whether or not this Event is a classic Event. If true, this Event is read-only

is_editableboolean

Whether this Event may be edited

keystring

Unique string identifier for this Event within the Project

last_modifiedstring date-time

The last time the Event was modified

namestring

A human readable name for this Event

page_idinteger

The Page ID associated with this Event

project_idinteger

The ID of this Event's parent Project

variation_specificboolean

Whether or not this Event is variation specific.

Example response

[
  {
    "config": {
      "selector": ".menu-options"
    },
    "description": "Item added to cart",
    "experiment_count": 3,
    "key": "add_to_cart",
    "name": "Add to Cart",
    "page_id": 5000,
    "project_id": 1000
  }
]