fix: ignore imported data when querying goals with custom props#6441
Open
ukutaht wants to merge 2 commits into
Open
fix: ignore imported data when querying goals with custom props#6441ukutaht wants to merge 2 commits into
ukutaht wants to merge 2 commits into
Conversation
zoldar
reviewed
Jun 10, 2026
| goal_type = Plausible.Goal.type(goal) | ||
| {prop_keys, prop_values} = Enum.unzip(goal.custom_props) | ||
|
|
||
| # `types` and `event_names_imports` are only used for matching goals |
Contributor
There was a problem hiding this comment.
I'd consider creating a separate function like goal_join_imported_data and return only fields that are relevant in each respective context. As is, this is turning very hairball-like.
| %{ | ||
| indices: [idx | acc.indices], | ||
| types: [to_string(goal_type) | acc.types], | ||
| types: [if(queryable_from_imports?, do: to_string(goal_type), else: "") | acc.types], |
Contributor
There was a problem hiding this comment.
Provided we split the logic, wouldn't it make more sense to filter out the custom prop goals right at the start?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Fixes APP-217
Goals with custom props are not considered in the imported data query logic. Filtering or breaking down by such a goal on a site with imported data either:
Changes