Skip to content

Conversion breakdowns drop every later day once the series limit is reached #655

Open

Description

@officialasishkumar

Description

A conversion chart with a breakdown loses data once the number of breakdown values reaches the report's limit. Every row after that point is dropped, including the later days of the series that were kept. Those lines stop early, and if the limit is reached on the first day, each series shows only that day. The summary and table built from the series are wrong in the same way.

The report editor sends limit: 500, so this happens with any breakdown that has at least 500 values over the range (paths, referrers, many custom properties). A smaller limit makes it happen sooner.

Root cause

toSeries in packages/core/src/modules/chart/conversion.service.ts checks the limit before it looks at the row's breakdown key:

if (limit && Object.keys(acc).length >= limit) {
  return acc;
}

The query orders rows by event_day, then by breakdown, so once the limit is reached, every later row is discarded, including rows of series that were already accepted.

The funnel's toSeries (funnel.service.ts) had the same bug and was fixed by checking the limit only for new keys. The conversion version never got that fix.

Expected behavior

The limit caps how many breakdown series come back. The series that are kept still have every day in the range.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions