OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Webhelp search - does anyone collect usage statistics



This is interesting to see, Robert. I didn't try this myself, but it seems we can set custom dimensions with GA. [1] So, we can capture the query and the page both at the same time. Having the search query in its own dimension helps with better analytics as I understand.

[1] https://developers.google.com/analytics/devguides/collection/analyticsjs/custom-dims-mets

On Thu, Feb 16, 2017 at 9:04 PM, Fekete, Róbert <robert.fekete@balabit.com> wrote:
Hi, 

We are using the webhelp output, and recently we modified it a bit to collect statistics about how often our readers use the search, what keywords they look for in our documents, and so on. 

Since we already use Google Analytics to get visitor statistics, the quickest and easiest was to post the search keyword to Google Analytics as well.

I was wondering if anyone else did something similar and would share any experiences?

Kind Regards, 

Robert

P.S: 
We didn't do anything fancy, and currently don't even check on which page of the document did the user use the search box. The actual change is only: 

docbook-xsl-ns-1.78.1/webhelp/template/search/nwSearchFnt.js
@@ -49,6 +49,12 @@ function Verifie(searchForm) {
    searchTextField = trim(document.searchForm.textToSearch.value);
    searchTextField = searchTextField.replace(/['"]/g,'');
   var expressionInput = searchTextField;

+  if (typeof ga != "undefined") {
+  ga('send', 'pageview', 'documentsearch?query=' + expressionInput);
+  }





--
~~~*******'''''''''''''*******~~~
Kasun Gajasinghe
Senior Software Engineer; WSO2 Inc.; http://wso2.com,


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]