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

Issue with Regex in Goals #21164

Open
Birkaransingh94 opened this issue Aug 22, 2023 · 8 comments
Open

Issue with Regex in Goals #21164

Birkaransingh94 opened this issue Aug 22, 2023 · 8 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@Birkaransingh94
Copy link

Hi Team,

There's an issue when a page visits goal has been setup with regex:
For E.g:
Correct Regex is:
https://example.example.co.uk/checkout/ABCD[0-9]+/$

However, when saving it in goals, it removes "+" from the regex and saves it as:
https://example.example.co.uk/checkout/ABCD[0-9] /$

Thanks.

@Birkaransingh94 Birkaransingh94 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 Aug 22, 2023
@michalkleiner
Copy link
Contributor

Yeah, I can see how that would happen as + is a space in the URL format.

@michalkleiner michalkleiner 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 Aug 22, 2023
@michalkleiner michalkleiner added this to the For Prioritization milestone Aug 22, 2023
@michalkleiner
Copy link
Contributor

michalkleiner commented Aug 22, 2023

Mildly related to #20875 where the validation would also help see this issue.

@sgiehl
Copy link
Member

sgiehl commented Aug 22, 2023

This looks like another problem related to #4231, but might already be possible to solve that by switching the goals api to use unsanitized parameters. See #19624

@michalkleiner
Copy link
Contributor

@Birkaransingh94 can you see if Stefan's suggestion to switch the goals api to using unsanitised parameters helps?

@michalkleiner michalkleiner added the Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. label Aug 23, 2023
@sgiehl
Copy link
Member

sgiehl commented Aug 23, 2023

@michalkleiner This is something we would need to do in the code

@sgiehl sgiehl removed the Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. label Aug 23, 2023
@michalkleiner
Copy link
Contributor

Ah right, I thought that was already an existing option. Apologies for the confusion.

@ampaze
Copy link

ampaze commented Aug 28, 2023

Is someone working on this? As Matomo does not support Goal Tracking for past events, saving/creating an goal with .+ in the regex will lose valuable information.

@michalkleiner
Copy link
Contributor

Not that I'm aware of at the moment, @ampaze. If you're keen to provide a PR we'll definitely look at it, otherwise it'll be up to the product team to prioritise the work on this.

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

No branches or pull requests

4 participants