Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APIv2: validate combining event-only metrics with session-only dimensions #5015

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

macobo
Copy link
Contributor

@macobo macobo commented Jan 24, 2025

Currently the following query results in a 500:

{
  "site_id": "plausible.io",
  "metrics": ["visitors", "events", "pageviews"],
  "dimensions": ["visit:exit_page"],
  "date_range": "7d"
}

This adds proper validation for that case that was previously missing.

In the future we might be able to remove some of these validations by selecting the appropriate value(s) from sessions table.

Basecamp ref: https://3.basecamp.com/5308029/buckets/39750953/card_tables/cards/8251923578

@macobo macobo requested a review from apata January 24, 2025 08:51
@macobo macobo force-pushed the fix-event-metrics-session-dimensions-validation branch from 5e02ad7 to 847343f Compare January 24, 2025 10:43
…nsions

Currently the following query results in a 500:

```json
{
  "site_id": "plausible.io",
  "metrics": ["visitors", "events", "pageviews"],
  "dimensions": ["visit:exit_page"],
  "date_range": "7d"
}
```

This adds proper validation for that case that was previously missing.
@macobo macobo force-pushed the fix-event-metrics-session-dimensions-validation branch from 847343f to fe75f1e Compare January 24, 2025 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant