@JeffS25 opened this Issue on July 5th 2018

Site search keyword is returning 'Undefined' as a search keyword.
The number of search results are more than 200 for 'Undefined' keyword. Can you please help me know in understanding why it's showing 'Undefined' as search keyword?


@tsteur commented on July 5th 2018 Member

Are you tracking Site Search using the Javascript trackSiteSearch() function?

@JeffS25 commented on July 6th 2018


Thanks for the quick response.

We are not using trackSiteSearch() function.We are using


Also, I have an issue where I am receiving the search result keyword under no search result keyword. please advise if I have to use

                    if(searchResultCount==null||searchResultCount==0 ){
            _paq.push([ 'trackSiteSearch', searchvalue, false, 0 ]);

            }else {
                  _paq.push([ 'trackSiteSearch', searchvalue, false, searchResultCount ]);

Please correct me if I am wrong, I am new to coding.


@tsteur commented on July 9th 2018 Member

Looking at the code I would maybe test your search form in the browsers where this happens just as a random thought. I'm thinking maybe your website actually sends something like /mypath?q=undefined because of a bug in your site search maybe?

Unfortunately, I'm not so familiar with the trackSiteSearch. On https://matomo.org/docs/site-search/ it suggests that you can use this method instead of trackPageView. On the page it also explains how to track no site searches etc. Maybe it helps.

@Findus23 commented on May 24th 2020 Member

Without checking what data is sent to Matomo in the HTTP request, it is hard to know if this is a bug in Matomo (but undefined sounds a lot like JS).

If you or someone else can reproduce this issue and provide more details, please reopen the issue or create a new one.

This Issue was closed on May 24th 2020
Powered by GitHub Issue Mirror