Skip to content

analytics_insight_create

Save a named insight for the current product: one to eight series over the analytics semantic layer, an optional formula combining them by key, a time window and how to display it.

Tool

analytics_insight_create

Save a named insight for the current product: one to eight series over the analytics semantic layer, an optional formula combining them by key, a time window and how to display it.

Save a named insight for the current product: one to eight series over the analytics semantic layer, an optional formula combining them by key, a time window and how to display it. The slug is the address the insight is read by and cannot be changed later. Stores the definition only; it does not run it. Series requests are validated with the same schemas analytics_metric_query and analytics_funnel_run accept, so a stored insight always runs.

Behavior

HTTP
POST /analytics/insights

Arguments

NameTypeRequiredDescription
kindstringNo description in the catalog.
namestringNo description in the catalog.
slugstringNo description in the catalog.
tagsarrayNo description in the catalog.
grainstringNo description in the catalog.
seriesarrayNo description in the catalog.
targetobjectNo description in the catalog.
windowobjectNo description in the catalog.
displaystringNo description in the catalog.
formulastringNo description in the catalog.
descriptionstringNo description in the catalog.

Response

FieldTypeAlwaysDescription
idstring
kindstring
namestring
slugstring
tagsarray
grainstring
seriesarray
targetobject
windowobject
displaystring
formulastring
created_atstring
created_bystring
product_idstring
updated_atstring
descriptionstring

Try it

Save a named insight for the current product: one to eight series over the analytics semantic layer, an optional formula combining them by key, a time window and how to display it.

When to use

Save a named insight for the current product: one to eight series over the analytics semantic layer, an optional formula combining them by key, a time window and how to display it. The slug is the address the insight is read by and cannot be changed later. Stores the definition only; it does not run it. Series requests are validated with the same schemas analytics_metric_query and analytics_funnel_run accept, so a stored insight always runs.

Example

Ask your agent something like this:

Save a named insight for the current product: one to eight series over the analytics semantic layer, an optional formula combining them by key, a time window and how to display it.

The agent will invoke analytics_insight_create with these arguments:

{
  "kind": "<kind>",
  "name": "<name>",
  "slug": "<slug>",
  "series": "<series>",
  "window": "<window>"
}

Esc

Start typing to search the docs.

navigateselect