You mean for segmentation? For segmentation I use the Matomo standard function. Here are two screenshots to make it clearer. (As a new user I can only embed on per answer. so I’ll put the second one in a new answer).
The inclusion (“Equals”) works, the exclusion (“Not Equals”) does not work.
Both use the same IPs and what I would like to do here is create one segment for internal visitors (from internal IP) and one segment for external visitors (not from internal IP).
if you do my_var ≠ 'A' OR my_var ≠ 'B' then it will be always true…
The subject was not about segments but about conversion tracking. Don’t forget that segments are not filter. If a user goes to page A and to page B, you’ll see his navigation to page A and B even if you segment on page A…
So you are saying that the negative segmentation does not work because of the OR condition? Should I use the AND condition to exclude three different IPs for one segment?
The other part of my post was about conversion tracking. I thought it was strange that all my goals that exclude conditions do not work so I made a connection to the negative segmentation that did not work.
This is just a boolean problem. With the following rule:
my_var ≠ 'A' OR my_var ≠ 'B'
Means « I’ll see the data if my_var is not A or if it is not B »
case my_var='C' as it is different from ‘A’, you’ll be able to see this data in your segment
case my_var='A' as it is different from ‘B’ (the second condition), you’ll see also this data in your segment whereas I think you wouldn’t…
So use and AND instead of an OR.
Goals are defined with some very simple rules… (maybe too simple?)
But most of the time, you should achieve a goal when you access some pages (more rarely when you don’t access some page). the page pattern is not a regex but a pattern:
Another way to achieve a goal could be use HTTP API (params idgoal and revenue) or JavaScript API (command trackGoal( idGoal, [customRevenue]);) or MTM (Tag of type Matomo Analytics, Tracking type = Goal)
Thank you for your time and effort, Philippe. I have altered the segmentation to AND and it works now I hope I am not taking advantage if I keep asking about the goals …
Concerning the goal: The site has an internal search and offers additional filters. So, if I search for “software”, the resulting URL is https://domain/dataset/?q=software
If I need additional filters, these are added to the URL, separated by &. So, if I filter the search e.g. with the tag “Masterportal”, the resulting URL is https://domain/dataset/?q=software&tags=Masterportal
If I want to define the number of searches conducted as a goal and do it with regex, the resulting goal could be
?q=(\d|\D)+$
I have actually implemented this one and it works.
However, this goal would also count the filters as new searches. So, if I want to exclude the filters from the count of searches, the goal should look like
?q=[^&]+$
Meaning, if the URL contains a &, it shall not be counted as a search. But it does not work. I have checked the regex with https://regexr.com/ and it seems functional
Just in case anyone else is interested, here’s the solution I’ve implemented as a goal. Since negative conditions (exclusions) are not allowed, I defined the allowed characters. This one is for German (if you think the umlauts are strange) and so you might want to adjust if you use it for other languages. Just don’t forget the space.