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

Incorrect tracking search result pages #19092

Open
Bira-navi opened this issue Apr 13, 2022 · 12 comments
Open

Incorrect tracking search result pages #19092

Bira-navi opened this issue Apr 13, 2022 · 12 comments

Comments

@Bira-navi
Copy link

Hello,

I have a problem concerning the keywords searched on the site. I don't understand why, when a search is performed and displays for example 5 results, the column PAGES OF SEARCH RESULTS displays 4. On my site, 10 results can be displayed on the same page. I also have data when there are 0 results.

Thank you.

@bx80
Copy link
Contributor

bx80 commented Apr 19, 2022

Hi @Bira-navi, thanks for reporting this. Would it be possible for you to share a screenshot of the problem to help us understand it a little better?

@Bira-navi
Copy link
Author

Hi @Bira-navi, thanks for reporting this. Would it be possible for you to share a screenshot of the problem to help us understand it a little better?

Hello, this is what i got :

Capture

@sgiehl
Copy link
Member

sgiehl commented Apr 25, 2022

@Bira-navi Are you using the javascript tracker to set the number of available search results?

@Bira-navi
Copy link
Author

Bira-navi commented Apr 25, 2022

@Bira-navi Are you using the javascript tracker to set the number of available search results?

I don't know where i can verify this, but i think that yes ?

@heurteph-ei
Copy link

@Bira-navi is the tracked site a WordPress site or another one?
What did you do in your site to be tracked by Matomo? (please copy-paste the code you used)

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/incorrect-tracking-search-result-pages/45681/2

@Bira-navi
Copy link
Author

Bira-navi commented Apr 25, 2022

@Bira-navi is the tracked site a WordPress site or another one? What did you do in your site to be tracked by Matomo? (please copy-paste the code you used)

I am not the one who launched Matomo on the portal.. I am not sure if its this code you want :

image
image
image
image

@heurteph-ei
Copy link

How are your track defined?

  • Do you use the following code:
_paq.push(['trackSiteSearch', keyword, category, resultCount]);
  • Do you just use the automatic search tracking defined below (in Administration>Measurables>Manage)?
    image

@lneuville
Copy link

Hi,
I'm experiencing the same issue on Matomo Analytics Cloud.
I'm using Matomo Tag Manager.
On the result page, I launch a Custom HTML Tag with :
<script type="text/javascript"> _paq.push(['trackSiteSearch', {{DLV-searched_expression}}, {{DLV-searched-category}}, {{DLV-search-results-number}}]); </script>
(on this page, I don't launch a Pageview Tag, following official Matomo's doc)

This Tag is triggered by a Custom Event, plugged on a Datalayer.Event "search" containing the requested data (searched expression, category, number of results).

In Administration, the Site search is also activated.

Thanks.
Rgds

@heurteph-ei
Copy link

heurteph-ei commented Apr 29, 2022

@lneuville
Do you see the event / tag when using container preview mode?
Do you see any JavaScript error in the browser console?
Do you see any HTTP request to your Matomo after that tag execution?

In Administration, the Site search is also activated.
If I don't do mistake, I think this is used for automatic search tracking thanks to params (like q=, query=, s=, search=, etc.) found in the page URLs

@lneuville
Copy link

Hi @heurteph-ei

Thanks for your questions ;

Do you see the event / tag when using container preview mode?

Yes. In preview mode, I see the Custom Event on the left bar, and the Custom HTML Tag launched

Do you see any JavaScript error in the browser console?

No error in the console

Do you see any HTTP request to your Matomo after that tag execution?
Yes. After the matomo.js call, I see :

https://XXXXXX.matomo.cloud/matomo.php?search=emballage&search_count=13&idsite=6&rec=1&r=898653&h=15&m=47&s=24&url=https://dev-example.example.com/home/faq/search/emballage&_id=5909d5132f607567&_idn=0&_refts=0&send_image=0&pdf=1&qt=0&realp=0&wma=0&fla=0&java=0&ag=0&cookie=1&res=1920x1080&dimension1=Biens ménagers&dimension2=Approvisionnement et achat - Directeur&dimension3=Compte centralisé&dimension4=FORFAIT&dimension5=declarant, signataire_attestation_conformite&dimension7=FR

and then :

https://XXXXXX.matomo.cloud/matomo.php?fa_vid=hgkjXW&fa_ef=mat-input-0&fa_lf=mat-input-0&fa_fields=[{"fa_fts":6890,"fa_fht":5693,"fa_fb":true,"fa_fn":"mat-input-0","fa_fch":1,"fa_ff":1,"fa_fd":0,"fa_fcu":0,"fa_ft":"text","fa_fs":0}]&fa_ts=7546&fa_su=1&fa_tts=7546&ca=1&idsite=6&rec=1&r=699654&h=15&m=47&s=22&url=https://dev-example.example.com/home/faq/search/tri&_id=5909d5132f607567&_idn=0&_refts=0&send_image=0&pdf=1&qt=0&realp=0&wma=0&fla=0&java=0&ag=0&cookie=1&res=1920x1080&dimension1=Biens ménagers&dimension2=Approvisionnement et achat - Directeur&dimension3=Compte centralisé&dimension4=FORFAIT&dimension5=declarant, signataire_attestation_conformite&dimension7=FR

Regarding the activation of the Site Search setting, indeed, it seems necessary when you use the 'automatic' search tracking... but I have a doubt wether it's also necessary in 'Custom HTML Tag' based method. I'll give it a try.

best rgds
Laurent

@heurteph-ei
Copy link

The second request seems to be related to another plugin (FormAnalytics, maybe), as fa_* parameters are not documented in the official API...
If the ID site is the good one (6), then I think all your searches are well tracked.

Now the question is: "how is the Search Results pages calculated"...?
Doing some quick test:
image
gives me 1 search "autre" with 2 pages of results, and another search "devbcompo" with also 2 pages of results. It seems that if for the same page view you have several identical searches events, then Matomo will consider this as a page navigation for the same search...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants