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

Zeroes ("0") in custom dimension values appear as hyphens ("-") #20129

Closed
rberggreen opened this issue Dec 20, 2022 · 1 comment · Fixed by #20131
Closed

Zeroes ("0") in custom dimension values appear as hyphens ("-") #20129

rberggreen opened this issue Dec 20, 2022 · 1 comment · Fixed by #20131
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@rberggreen
Copy link

Expected Behavior

Custom dimension values should appear in the dashboard exactly as they were sent.

Current Behavior

When "0" is used as the value for a custom dimension, it appears as "-" in the dashboard.

Skärmavbild 2022-12-20 kl  15 10 26

Possible solution

Workaround: Represent boolean values in another way, e.g. "false"/"true".

Steps to Reproduce

  1. Post an analytics event containing a custom dimension such as dimension1=0
  2. Go to the Matomo dashboard > Visitors > [the custom dimension in question]

The bug does not happen when viewing the equivalent data in the Visitor profile view.

Context

We are using the custom dimensions feature to collect data about the user's environment such as whether a screen reader is active or whether an external keyboard is connected. Custom dimension values can only be strings and we have chosen to convert all of our bool values to "0"/"1".

The bug makes the presented data harder to understand. It can also raise concerns about the data being correct in the first place, which it appears to be.

Your Environment

  • Matomo Version: 4.12.3
  • PHP Version: 7.4
  • Browser: Google Chrome 108.0.5359.124
  • Operating System: macOS Monterey 12.5.1
@rberggreen rberggreen added Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels Dec 20, 2022
@sgiehl
Copy link
Member

sgiehl commented Dec 21, 2022

Hi @rberggreen
Thanks for creating this report. The value 0 should indeed be shown in the label column. The hyphen should only be shown in other columns. I'll have a quick look if we can easily fix that.

@sgiehl sgiehl added Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. To Triage An issue awaiting triage by a Matomo core team member labels Dec 21, 2022
@sgiehl sgiehl added this to the 4.13.1 milestone Dec 21, 2022
@sgiehl sgiehl self-assigned this Dec 21, 2022
@mattab mattab added the 4.13.1 label Jan 4, 2023
@justinvelluppillai justinvelluppillai modified the milestones: 4.13.1, 4.13.2 Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants