openapi: 3.1.0 info: title: OpenPanel Event Insights API version: 1.0.0 description: Legacy event ingestion (deprecated, use /track) tags: - name: Insights description: Query analytics data paths: /insights/{projectId}/overview: get: tags: - Insights description: Get an overview of key metrics for the project (sessions, pageviews, bounce rate, duration). parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: string enum: - hour - day - week - month in: query name: interval - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/active_users: get: tags: - Insights description: Get rolling active user counts over the last N days. parameters: - schema: default: 7 type: integer minimum: 1 maximum: 90 in: query name: days - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/retention: get: tags: - Insights description: Get weekly retention series data. parameters: - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/retention/cohort: get: tags: - Insights description: Get retention cohort data. parameters: - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/pages/top: get: tags: - Insights description: Get the top pages by pageviews for the given date range. parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/pages/entry_exit: get: tags: - Insights description: Get entry or exit pages ranked by session count. parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: default: entry type: string enum: - entry - exit in: query name: mode - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/pages/performance: get: tags: - Insights description: Get page-level performance metrics (bounce rate, avg duration, sessions). parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: string in: query name: search - schema: type: string enum: - sessions - pageviews - bounce_rate - avg_duration in: query name: sortBy - schema: type: string enum: - asc - desc in: query name: sortOrder - schema: default: 50 type: integer minimum: 1 maximum: 500 in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/metrics: get: tags: - Insights description: Get aggregated website metrics including sessions, pageviews, and bounce rate. parameters: - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/live: get: tags: - Insights description: Get the current number of live (active) visitors. parameters: - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/pages: get: tags: - Insights description: Get top pages with pageview counts for the selected date range. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/referrer: get: tags: - Insights description: Get top values for the "referrer" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/referrer_name: get: tags: - Insights description: Get top values for the "referrer_name" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/referrer_type: get: tags: - Insights description: Get top values for the "referrer_type" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/utm_source: get: tags: - Insights description: Get top values for the "utm_source" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/utm_medium: get: tags: - Insights description: Get top values for the "utm_medium" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/utm_campaign: get: tags: - Insights description: Get top values for the "utm_campaign" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/utm_term: get: tags: - Insights description: Get top values for the "utm_term" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/utm_content: get: tags: - Insights description: Get top values for the "utm_content" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/region: get: tags: - Insights description: Get top values for the "region" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/country: get: tags: - Insights description: Get top values for the "country" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/city: get: tags: - Insights description: Get top values for the "city" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/device: get: tags: - Insights description: Get top values for the "device" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/brand: get: tags: - Insights description: Get top values for the "brand" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/model: get: tags: - Insights description: Get top values for the "model" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/browser: get: tags: - Insights description: Get top values for the "browser" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/browser_version: get: tags: - Insights description: Get top values for the "browser_version" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/os: get: tags: - Insights description: Get top values for the "os" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/os_version: get: tags: - Insights description: Get top values for the "os_version" dimension. parameters: - schema: default: [] type: array items: type: object properties: id: description: Unique identifier for the filter type: string name: type: string description: The property name to filter on operator: type: string enum: - is - isNot - contains - doesNotContain - startsWith - endsWith - regex - isNull - isNotNull - gt - lt - gte - lte - inCohort - notInCohort description: The operator to use for the filter value: type: array items: anyOf: - anyOf: - anyOf: - type: string - type: number - type: boolean - type: 'null' description: The values to filter on cohortId: description: Cohort ID when using inCohort/notInCohort operators type: string required: - name - operator - value in: query name: filters - schema: anyOf: - type: string - type: 'null' in: query name: startDate - schema: anyOf: - type: string - type: 'null' in: query name: endDate - schema: default: 7d type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: number in: query name: cursor - schema: default: 10 type: number in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/funnel: get: tags: - Insights description: Get funnel conversion rates for a sequence of events. parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: anyOf: - type: array items: type: string - type: string in: query name: steps required: true - schema: default: 24 type: integer minimum: 1 maximum: 720 in: query name: windowHours - schema: default: session_id type: string enum: - session_id - profile_id in: query name: groupBy - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/traffic/referrers: get: tags: - Insights description: Get traffic breakdown by referrer source. parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: default: referrer_name type: string enum: - referrer_name - referrer_type - referrer - utm_source - utm_medium - utm_campaign in: query name: breakdown - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/traffic/geo: get: tags: - Insights description: Get traffic breakdown by geographic dimension (country, region, city). parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: default: country type: string enum: - country - region - city in: query name: breakdown - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/traffic/devices: get: tags: - Insights description: Get traffic breakdown by device type, browser, or OS. parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: default: device type: string enum: - device - browser - os in: query name: breakdown - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/user_flow: get: tags: - Insights description: Get user flow paths before, after, or between specified events. parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: string in: query name: startEvent required: true - schema: type: string in: query name: endEvent - schema: default: after type: string enum: - after - before - between in: query name: mode - schema: default: 5 type: integer minimum: 2 maximum: 10 in: query name: steps - schema: anyOf: - type: array items: type: string - type: string in: query name: exclude - schema: anyOf: - type: array items: type: string - type: string in: query name: include - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/engagement: get: tags: - Insights description: Get engagement metrics for the project. parameters: - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/events: get: tags: - Insights description: Query events with optional filters for date range, profile, and properties. parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: anyOf: - type: array items: type: string - type: string in: query name: eventNames - schema: type: string in: query name: path - schema: type: string in: query name: country - schema: type: string in: query name: city - schema: type: string in: query name: device - schema: type: string in: query name: browser - schema: type: string in: query name: os - schema: type: string in: query name: referrer - schema: type: string in: query name: referrerName - schema: type: string in: query name: referrerType - schema: type: string in: query name: profileId - schema: type: object propertyNames: type: string additionalProperties: type: string in: query name: properties - schema: default: 20 type: integer minimum: 1 maximum: 100 in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/events/names: get: tags: - Insights description: List all distinct event names tracked in the project. parameters: - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/events/properties: get: tags: - Insights description: List all property keys for a given event name. parameters: - schema: type: string in: query name: eventName - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/events/property_values: get: tags: - Insights description: Get the top values for a specific event property key. parameters: - schema: type: string in: query name: eventName required: true - schema: type: string in: query name: propertyKey required: true - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/profiles: get: tags: - Insights description: Search and filter user profiles. parameters: - schema: type: string in: query name: name - schema: type: string in: query name: email - schema: type: string in: query name: country - schema: type: string in: query name: city - schema: type: string in: query name: device - schema: type: string in: query name: browser - schema: type: integer minimum: 1 maximum: 9007199254740991 in: query name: inactiveDays - schema: type: integer minimum: 1 maximum: 9007199254740991 in: query name: minSessions - schema: type: string in: query name: performedEvent - schema: default: desc type: string enum: - asc - desc in: query name: sortOrder - schema: default: 20 type: integer minimum: 1 maximum: 100 in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/profiles/{profileId}: get: tags: - Insights description: Get a single user profile with their recent events. parameters: - schema: default: 20 type: integer minimum: 1 maximum: 100 in: query name: eventLimit - schema: type: string in: path name: projectId required: true - schema: type: string in: path name: profileId required: true responses: '200': description: Default Response /insights/{projectId}/profiles/{profileId}/sessions: get: tags: - Insights description: Get sessions for a specific user profile. parameters: - schema: default: 20 type: integer minimum: 1 maximum: 100 in: query name: limit - schema: type: string in: path name: projectId required: true - schema: type: string in: path name: profileId required: true responses: '200': description: Default Response /insights/{projectId}/profiles/{profileId}/metrics: get: tags: - Insights description: Get aggregated metrics for a specific user profile. parameters: - schema: type: string in: path name: projectId required: true - schema: type: string in: path name: profileId required: true responses: '200': description: Default Response /insights/{projectId}/sessions: get: tags: - Insights description: Query sessions with optional filters. parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: string in: query name: country - schema: type: string in: query name: city - schema: type: string in: query name: device - schema: type: string in: query name: browser - schema: type: string in: query name: os - schema: type: string in: query name: referrer - schema: type: string in: query name: referrerName - schema: type: string in: query name: referrerType - schema: type: string in: query name: profileId - schema: default: 20 type: integer minimum: 1 maximum: 100 in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/groups/types: get: tags: - Insights description: List all group types defined in the project. parameters: - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/groups: get: tags: - Insights description: Search and filter groups. parameters: - schema: type: string in: query name: type - schema: type: string in: query name: search - schema: default: 20 type: integer minimum: 1 maximum: 100 in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/groups/{groupId}: get: tags: - Insights description: Get a single group with its members. parameters: - schema: default: 10 type: integer minimum: 1 maximum: 50 in: query name: memberLimit - schema: type: string in: path name: projectId required: true - schema: type: string in: path name: groupId required: true responses: '200': description: Default Response /insights/{projectId}/reports/{reportId}/data: get: tags: - Insights description: Get the data for a saved report. parameters: - schema: type: string in: path name: projectId required: true - schema: type: string in: path name: reportId required: true responses: '200': description: Default Response /insights/{projectId}/gsc/overview: get: tags: - Insights description: Get a Google Search Console performance overview (clicks, impressions, CTR, position). parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: default: day type: string enum: - day - week - month in: query name: interval - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/gsc/pages: get: tags: - Insights description: Get top pages from Google Search Console. parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: default: 100 type: integer minimum: 1 maximum: 1000 in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/gsc/pages/details: get: tags: - Insights description: Get detailed GSC metrics for a specific page URL. parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: string format: uri in: query name: page required: true - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/gsc/queries: get: tags: - Insights description: Get top search queries from Google Search Console. parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: default: 100 type: integer minimum: 1 maximum: 1000 in: query name: limit - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/gsc/queries/details: get: tags: - Insights description: Get detailed GSC metrics for a specific search query. parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: string in: query name: query required: true - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/gsc/queries/opportunities: get: tags: - Insights description: Get GSC query opportunities (high impressions, low CTR). parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: default: 50 type: integer minimum: 1 maximum: 9007199254740991 in: query name: minImpressions - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response /insights/{projectId}/gsc/cannibalization: get: tags: - Insights description: Detect keyword cannibalization across pages in Google Search Console. parameters: - schema: type: string in: query name: startDate - schema: type: string in: query name: endDate - schema: type: string enum: - 30min - lastHour - today - yesterday - 7d - 30d - 6m - 12m - monthToDate - lastMonth - yearToDate - lastYear - custom in: query name: range - schema: type: string in: path name: projectId required: true responses: '200': description: Default Response