Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Make realtime goal conversions clickable (#2035)

Vinicius Brasilba36b08fd611
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fa9c9c63dd..b07c06749f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,6 +27,7 @@ All notable changes to this project will be documented in this file.
- Add ability to import historical data from GA: plausible/analytics#1753
- API route `GET /api/v1/sites/:site_id`
- Hovering on top of list items will now show a [tooltip with the exact number instead of a shortened version](https://github.com/plausible/analytics/discussions/1968)
+- Filter goals in realtime filter by clicking goal name
### Fixed
- UI fix where multi-line text in pills would not be underlined properly on small screens.
diff --git a/assets/js/dashboard/stats/conversions/index.js b/assets/js/dashboard/stats/conversions/index.js
index e63ac2ee84..caf65876fb 100644
--- a/assets/js/dashboard/stats/conversions/index.js
+++ b/assets/js/dashboard/stats/conversions/index.js
@@ -59,20 +59,6 @@ export default class Conversions extends React.Component {
.then((res) => this.setState({loading: false, goals: res, prevHeight: null}))
}
- renderGoalText(goalName) {
- if (this.props.query.period === 'realtime') {
- return <span className="block px-2 py-1.5 relative z-9 md:truncate break-all dark:text-gray-200">{goalName}</span>
- } else {
- return (
- <Link to={url.setQuery('goal', goalName)} className="block px-2 py-1.5 hover:underline relative z-9 break-all lg:truncate dark:text-gray-200">
- {goalName}
- </Link>
- )
- }
- }
-
-
-
renderGoal(goal) {
const { viewport } = this.state;
const renderProps = this.props.query.filters['goal'] == goal.name && goal.prop_names
@@ -87,7 +73,7 @@ export default class Conversions extends React.Component {
maxWidthDeduction={this.getBarMaxWidth()}
plot="unique_conversions"
>
- {this.renderGoalText(goal.name)}
+ <Link to={url.setQuery('goal', goal.name)} className="block px-2 py-1.5 hover:underline relative z-9 break-all lg:truncate dark:text-gray-200">{goal.name}</Link>
</Bar>
<div className="dark:text-gray-200">
<span className="inline-block w-20 font-medium text-right">{numberFormatter(goal.unique_conversions)}</span>