Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Added custom metrics descriptions

Blue Mouse8d9132ced336
diff --git a/app/pages/Project/View/components/AddAViewModal.tsx b/app/pages/Project/View/components/AddAViewModal.tsx
index c4af553be..36379b40a 100644
--- a/app/pages/Project/View/components/AddAViewModal.tsx
+++ b/app/pages/Project/View/components/AddAViewModal.tsx
@@ -113,11 +113,12 @@ const EditMetric = ({ metric, onChange, onDelete, errors, setErrors }: IEditMetr
}}
error={errors[`${metric.id}_customEventName`]}
/>
- <div className='mt-2 flex items-center justify-between'>
+ <div className='mt-3 flex items-start justify-between'>
<Input
className='w-[48%]'
maxLength={100}
- label={t('project.metrics.optinalEventKey')}
+ label={t('project.metrics.optinalEventKey.title')}
+ hint={t('project.metrics.optinalEventKey.description')}
value={metric.metaKey}
onChange={({ target }) => {
setErrors((prev) => ({
@@ -131,7 +132,8 @@ const EditMetric = ({ metric, onChange, onDelete, errors, setErrors }: IEditMetr
<Input
className='w-[48%]'
maxLength={100}
- label={t('project.metrics.optinalEventValue')}
+ label={t('project.metrics.optinalEventValue.title')}
+ hint={t('project.metrics.optinalEventValue.description')}
value={metric.metaValue}
onChange={({ target }) => {
setErrors((prev) => ({
@@ -143,11 +145,12 @@ const EditMetric = ({ metric, onChange, onDelete, errors, setErrors }: IEditMetr
error={errors[`${metric.id}_metaValue`]}
/>
</div>
- <div className='mt-2 flex items-center justify-between'>
+ <div className='mt-3 flex items-start justify-between'>
<Input
className='w-[48%]'
maxLength={100}
- label={t('project.metrics.metricKey')}
+ label={t('project.metrics.metricKey.title')}
+ hint={t('project.metrics.metricKey.description')}
value={metric.metricKey}
onChange={({ target }) => {
setErrors((prev) => ({
@@ -168,7 +171,8 @@ const EditMetric = ({ metric, onChange, onDelete, errors, setErrors }: IEditMetr
onChange('metaValueType', key)
}}
- label={t('project.metrics.metricType')}
+ label={t('project.metrics.metricType.title')}
+ hint={t('project.metrics.metricType.description')}
title={activeCustomEventType}
capitalise
/>
diff --git a/public/locales/en.json b/public/locales/en.json
index 6524a4993..595aff29f 100644
--- a/public/locales/en.json
+++ b/public/locales/en.json
@@ -788,10 +788,22 @@
"metrics": {
"xAvg": "\"{{x}}\" average",
"xTotal": "\"{{x}}\" total",
- "metricKey": "Custom metric key",
- "metricType": "Custom metric type",
- "optinalEventKey": "Event key (optional)",
- "optinalEventValue": "Event value (optional)"
+ "metricKey": {
+ "title": "Custom metric key",
+ "description": "Metadata key to aggregate (for example, \"amount\")."
+ },
+ "metricType": {
+ "title": "Custom metric type",
+ "description": "Specifies how to interpret the custom metric value. For example, Decimal will convert \"15.99\" to 15.99, while Integer will interpret it as 15."
+ },
+ "optinalEventKey": {
+ "title": "Event key (optional)",
+ "description": "Custom event metadata key to filter (for example, \"currency\")."
+ },
+ "optinalEventValue": {
+ "title": "Event value (optional)",
+ "description": "Custom event metadata value to filter (for example, \"GBP\")."
+ }
},
"metaValueType": {
"decimal": "Decimal",