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

Add a special goal: "WP Form Completions" #5013

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

RobertJoonas
Copy link
Contributor

@RobertJoonas RobertJoonas commented Jan 23, 2025

Changes

https://3.basecamp.com/5308029/buckets/32037438/card_tables/cards/6013863433#__recording_8250028578

Adds a new special goal (WP Form Completion) with a special property (path). This will behave exactly the same as the 404 goal (that has the path property too):

  • It will be included in the full Plausible CSV export (imported_custom_events.csv) with the path prop
  • it will be included from imported data in stats queries if it exists (from imports where it doesn't, e.g. GA4, we will silently not return any data for this goal)
  • In the dashboard, clicking on the goal in the goals breakdown, the "special goal contents" will pop up in the conversions tab:
image

Tests

  • Automated tests have been added

Changelog

  • Entry has been added to changelog

Documentation

  • Docs have been updated

Dark mode

  • This PR does not change the UI

@RobertJoonas RobertJoonas requested a review from aerosol January 24, 2025 09:38
Copy link
Member

@aerosol aerosol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one comment wrt potentially better coverage

|> get("/api/stats/#{site.domain}/custom-prop-values/url?period=day")
|> json_response(200)
|> Map.get("results")
for special_prop <- Plausible.Props.internal_keys() do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe worth adding it also to the remaining tests mentioning "WP Search Query" for example?

I'm seeing props_test.exs and query_imported_test.exs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added to props_test.exs - b343599.

In query_imported_test.exs it's already covered via for goal_name <- Plausible.Imported.goals_with_url() do ...

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.

2 participants