diff --git a/components/metrics/EventsChart.js b/components/metrics/EventsChart.js
index b44aa22d..c5d6a898 100644
--- a/components/metrics/EventsChart.js
+++ b/components/metrics/EventsChart.js
@@ -12,7 +12,9 @@ import { EVENT_COLORS, TOKEN_HEADER } from 'lib/constants';
export default function EventsChart({ websiteId, className, token }) {
const [{ startDate, endDate, unit, modified }] = useDateRange(websiteId);
const [timezone] = useTimezone();
- const { query } = usePageQuery();
+ const {
+ query: { url, eventType },
+ } = usePageQuery();
const shareToken = useShareToken();
const { data, loading } = useFetch(
@@ -23,12 +25,13 @@ export default function EventsChart({ websiteId, className, token }) {
end_at: +endDate,
unit,
tz: timezone,
- url: query.url,
+ url,
+ event_type: eventType,
token,
},
headers: { [TOKEN_HEADER]: shareToken?.token },
},
- [modified],
+ [modified, eventType],
);
const datasets = useMemo(() => {
diff --git a/components/metrics/EventsTable.js b/components/metrics/EventsTable.js
index e497a25e..b3427775 100644
--- a/components/metrics/EventsTable.js
+++ b/components/metrics/EventsTable.js
@@ -4,16 +4,18 @@ import MetricsTable from './MetricsTable';
import Tag from 'components/common/Tag';
import DropDown from 'components/common/DropDown';
import { eventTypeFilter } from 'lib/filters';
+import usePageQuery from 'hooks/usePageQuery';
import styles from './EventsTable.module.css';
const EVENT_FILTER_DEFAULT = {
- value: 'EVENT_FILTER_DEFAULT',
+ value: 'all',
label: