Product analytics API

Introduced in GitLab 15.4 with a flag named cube_api_proxy. Disabled by default.

On self-managed GitLab, by default this feature is not available. To make it available per project or for your entire instance, ask an administrator to enable the feature flag named cube_api_proxy. On GitLab.com, this feature is not available. This feature is not ready for production use.
note
Make sure to define the cube_api_base_url and cube_api_key application settings first using the API.

Send query request to Cube

Generate an access token that can be used to query the Cube API. For example:

POST /projects/:id/product_analytics/request/load
POST /projects/:id/product_analytics/request/dry-run
AttributeTypeRequiredDescription
idintegeryesThe ID of a project that the current user has read access to.
include_tokenbooleannoWhether to include the access token in the response. (Only required for funnel generation.)

Request body

The body of the load request must be a valid Cube query.

{
  "query": {
    "measures": [
      "Jitsu.count"
    ],
    "timeDimensions": [
      {
        "dimension": "Jitsu.utcTime",
        "dateRange": "This week"
      }
    ],
    "order": [
      [
        "Jitsu.count",
        "desc"
      ],
      [
        "Jitsu.docPath",
        "desc"
      ],
      [
        "Jitsu.utcTime",
        "asc"
      ]
    ],
    "dimensions": [
      "Jitsu.docPath"
    ],
    "limit": 23
  },
  "queryType": "multi"
}

Send metadata request to Cube

Return Cube Metadata for the Analytics data. For example:

GET /projects/:id/product_analytics/request/meta
AttributeTypeRequiredDescription
idintegeryesThe ID of a project that the current user has read access to.

List a project’s funnels

List all funnels for a project. For example:

GET /projects/:id/product_analytics/funnels
AttributeTypeRequiredDescription
idintegeryesThe ID of a project that the current user has the Developer role for.