PostHog / PostHog/posthog

Add possibility of using properties of objects within a list property in insights

Open
#17,824 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature/hogql feature/insights team/product-analytics
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
7h 27m
Merged PRs (30d)
222

Description

Is your feature request related to a problem?

I am sending a list of products represented as objects inside the order property. Currently, I cannot access any of the individual fields of each order to use it as a filter or as a break down.

Some simple thing like contains within products work, but doing anything more advanced like aggregations or calculations on 3rd level of properties does not seem to be supported.

Describe the solution you'd like

Have a new type of properties: list and object, that would allow me to select the filter as follows:

  • Event: order placed
  • Property: products
  • List object property: product_name

Describe alternatives you've considered

  • Using HogSQL does not work for me with properties.products.product_name = 'hog'
  • Flattening a schema or using HogSQL

Additional context

Thank you for your feature request – we love each and every one!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. First clarify the intended semantics for nested list and object properties in filters, breakdowns, aggregations, and calculations, then identify the relevant insights implementation and tests; done means those use cases are supported with coverage.

Written by the indexing model from the issue text.

Assessment

Domain
analytics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.