Bonjour @laurent50
Effectivement cela ne semble pas normal.
En regardant le détail de l’aide sur la recherche interne, on lit :
Please note; when enabling the Site Search feature in Matomo using URL Parameters, the Site Searches that are tracked with this method will not register as a pageview in Matomo . Clicked pages from the results of a Site Search should be tracked as a pageview.
Je suis d’accord avec vous, cela devrait aussi générer une page vue (de mon côté, j’implémente manuellement la recherche).
En parcourant le GitHub Matomo, je suis tombé là dessus (cf. 2nd cas décrit par l’auteur sgiehl / Stefan Giehl):
opened 10:03AM - 24 Jan 24 UTC
RFC
c: Data Integrity & Accuracy
Matomo allows to track site searches. This can currently be achieved in two diff… erent ways:
* **Automatic detection**
Whenever a page view url contains a certain keyword parameter, it will be automatically converted to a site search instead
* **Manual tracking**
By calling e.g. `trackSiteSearch` tracker method, you can manually provide keyword, category and search count, which will then be sent as a site search tracking request
While writing some tests I came across some inconsistency around how site searches are tracked compared to other actions, that we should evaluate for the correctness.
## Tracking of Exit page url / title
When a page view is tracked, we automatically update the visit table dimensions `visit_exit_idaction_name` and `visit_exit_idaction_url`, which contain the page url and title of this page view.
Those dimensions are currently only set when a page view happens. Except for site searches. If a site search is tracked, the `visit_exit_idaction_name` is updated to the keyword of the site search, while `visit_exit_idaction_url` is set to `null`.
### Example:
A visitor comes to a page `/test` with title `Title` and an according page view is tracked. They use the search bar on the page, which directly provides suggestions in a drop down. For this action a manual site search action gets triggered for the keyword. The user leaves without clicking any of the entries.
### Current Behavior
This user would end up in the database with two actions (correct), but his exit action would be set to the search keyword with no url.
### Need for clarification
Is it considered correct, that this user cannot be found when e.g. segmenting for the exit page url `\test` or the title `Title`. The page `/test` would also not appear in the exit page reports.
## Automatic conversion of page views to site searches
When site search keywords are configured, Matomo automatically tries to detect site searches by looking for certain keyword parameters. If such a keyword is found Matomo will only track a site search, but no page view.
### Example
A visitor comes e.g. from a search engine to a url like `/search?kwd=keyword`. This page has a certain title and the implemented tracking code sends out a page view tracking request for the URL and title.
### Current Behavior
As the url provided for tracking the pageview contains a configured site search keyword param, it will end up in tracking a visitor, only having exact one site search action, but no page view at all.
### Need for clarification
Is it considered correct, to only track a site search in this case? Personally I would have expected a page view and a site search action to be tracked. Otherwise the page url and title that were originally provided for the page view are actually lost and stored nowhere. If you e.g. have a search on `/search` and that page is only opened after providing a search keyword, the page itself might actually never occur in the page reports.
---
@Stan-vw @tsteur @mattab Would you mind having a look at this one in order to clarify if those behaviors are correct? To me it feels unexpected to handle site searches that way.
Ce qui est donc considéré comme un comportement normal… N’hésitez pas à y ajouter votre propre commentaire à ce sujet !