Quantcast
Channel: Matomo forums - Latest topics
Viewing all articles
Browse latest Browse all 13992

Not able to log data in Search keyword with no results

$
0
0

@Ajay wrote:

Hi
I want to log data in search keyword with no results field of site Search.
Below is my code

var searchKey = false;
if($('#backHaulEstCost').val().trim().length>0){
searchKey = true;
_paq.push(['trackSiteSearch',$('#backHaulEstCost').val().trim(),'Back Haul Est Cost']);
}
if(!searchKey){
//_paq.push([ 'trackSiteSearch', keywords + '', 0 ]);
var searchCount = 0; // set this value when rendering the search result page
paq.push(['setCustomUrl', document.URL + '&searchcount=' + searchCount]);
_paq.push(['trackPageView']);
}
Please tell me how i can log data into Search Keywords with no Result widget

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 13992

Trending Articles