Product Analytics

Compute a Sankey diagram

Compute a Sankey diagram of how sessions flow between the values of two facets, showing where users continue and where they drop off at each step.

post/api/v2/product-analytics/sankey

Request

Request body

Example request

{
  "data": {
    "attributes": {
      "definition": {
        "entries_per_step": 10,
        "number_of_steps": 3,
        "source": "@view.name",
        "target": "@view.name"
      },
      "search": {
        "audience_filters": {
          "formula": "u",
          "segments": [
            {
              "segment_id": "00000000-0000-0000-0000-000000000000"
            }
          ],
          "users": [
            {
              "name": "u",
              "query": "*"
            }
          ]
        },
        "join_keys": {
          "primary": "@session.id"
        },
        "query": "@type:view"
      },
      "time": {
        "from": 1756425600000,
        "to": 1756857600000
      }
    },
    "type": "sankey_request"
  }
}

Response

OK

Example response

{
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "type": "sankey_response"
  }
}

Changes

Changes to this operation have not been checked yet.