matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.64k stars 2.62k forks source link

Plugin Internal search tracking - search analytics reports #5469

Closed mattab closed 11 years ago

mattab commented 16 years ago

Piwik now has internal search keywords tracking. Awesome!

Functionnality:

anonymous-matomo-user commented 12 years ago

I just installed the latest SiteSearch with 1.7.1 and clicked on the "Site Search" link under the "Actions" tab and the page never renders - it just shows the progress bar eternally spinning. The following javascript error appears - 'SiteSearch_ManipulateTable is not defined'.

timo-bes commented 12 years ago

Have you tried pressing refresh in you browser? You might need to reload a JS file.

anonymous-matomo-user commented 12 years ago

Replying to EZdesign:

Have you tried pressing refresh in you browser? You might need to reload a JS file.

Doh. Yep, needed a full browser refresh for reloading JS file. Thanks!

anonymous-matomo-user commented 12 years ago

I couldn't get extended characters (like chinese, etc) to display properly until I modified the file datatable_keywords.tpl. I changed the following:

<tr searchterm="{$row.metadata.searchTerm|utf8_decode|htmlentities}" id_search="{$row.metadata.idSearch}"> {foreach from=$dataTableColumns item=column} <td> {if !$row.idsubdatatable && $column=='label' && !empty($row.metadata.url)}<span class="urlLink">{$row.metadata.url}</span>{/if} {if $column=='label'}{logoHtml metadata=$row.metadata alt=$row.columns.label}{/if} {if isset($row.columns[$column])}{$row.columns[$column]}{else}{$defaultWhenColumnValueNotDefined}{/if} </td> {/foreach}

</tr>

to:

<tr searchterm="{$row.metadata.searchTerm|utf8_decode}" id_search="{$row.metadata.idSearch}" test="test"> {foreach from=$dataTableColumns item=column} <td> {if !$row.idsubdatatable && $column=='label' && !empty($row.metadata.url)}<span class="urlLink">{$row.metadata.url}</span>{/if} {if $column=='label'}{logoHtml metadata=$row.metadata alt=$row.columns.label}{/if} {if isset($row.columns[$column])}{$row.columns[$column]|utf8_decode}{else}{$defaultWhenColumnValueNotDefined}{/if} </td> {/foreach}

</tr>

Above, the following two parts were changed.

  1. {$row.metadata.searchTerm|utf8_decode|htmlentities}
  2. {$row.columns[$column]}

Not sure if it is the way I'm using the plugin that required the above change.

anonymous-matomo-user commented 12 years ago

Sorry for the formatting, here it is again -

Original:

<tr searchterm="{$row.metadata.searchTerm|utf8_decode|htmlentities}" id_search="{$row.metadata.idSearch}">
{foreach from=$dataTableColumns item=column}
<td>
{if !$row.idsubdatatable && $column=='label' && !empty($row.metadata.url)}<span class="urlLink">{$row.metadata.url}</span>{/if}
{if $column=='label'}{logoHtml metadata=$row.metadata alt=$row.columns.label}{/if}
{if isset($row.columns[$column])}{$row.columns[$column]}{else}{$defaultWhenColumnValueNotDefined}{/if}
</td>
{/foreach}
</tr>

Changed:

<tr searchterm="{$row.metadata.searchTerm|utf8_decode}" id_search="{$row.metadata.idSearch}" test="test">
 {foreach from=$dataTableColumns item=column}
  <td>
   {if !$row.idsubdatatable && $column=='label' && !empty($row.metadata.url)}<span class="urlLink">{$row.metadata.url}</span>{/if}
   {if $column=='label'}{logoHtml metadata=$row.metadata alt=$row.columns.label}{/if}
   {if isset($row.columns[$column])}{$row.columns[$column]|utf8_decode}{else}{$defaultWhenColumnValueNotDefined}{/if}
  </td>
 {/foreach}
</tr>
anonymous-matomo-user commented 12 years ago

Hi, im new to piwik and web analytics, but i tried out the plugin. i tried to install the plugin with piwik 1.7 and after install i get the following message:

Unable to load plugin 'BeezyT-piwik-sitesearch-908962c' because '/anwendungen/piwik/piwik/plugins/BeezyT-piwik-sitesearch-908962c/BeezyT-piwik-sitesearch-908962c.php' couldn't be found. You can manually uninstall the plugin by removing the line Plugins[] = BeezyT-piwik-sitesearch-908962c from the Piwik config file.

Backtrace:

0 /anwendungen/piwik/piwik/plugins/CorePluginsAdmin/Controller.php(28): Piwik_PluginsManager->loadPlugin('BeezyT-piwik-si...')

1 function: Piwik_CorePluginsAdmin_Controller->index()

2 /anwendungen/piwik/piwik/core/FrontController.php(138): call_user_func_array(Array, Array)

3 /anwendungen/piwik/piwik/index.php(53): Piwik_FrontController->dispatch()

4 {main}

any idea where my problem is?

Thx and Bye

timo-bes commented 12 years ago

I don't know what exactly you downloaded but it seems to be wrong.

Go to https://github.com/BeezyT/piwik-sitesearch/downloads and click Download as ZIP. Extract the ZIP and place the folder SiteSearch in the plugins folder of you Piwik installation.

anonymous-matomo-user commented 12 years ago

thx!

now its working just fine. The Problem was the name of the folder i guess.

Also the tracking of the words seems to work perfectly.

Would be very nice if this would be a component of piwik.

anonymous-matomo-user commented 12 years ago

Hi,

the plugin is tracking my search terms but not the results. Does anybody know what causes this? Do i need some extra JS Code?

THX

Tjorben

anonymous-matomo-user commented 12 years ago

Hi,

I started to use piwik a few weeks ago and now I wanted to try the SiteSearch widget. I tried a lot of different settings for the SITE URL and the PARAMETER but it's always the same on the dashboard --> actions --> Site search (I'm not sure if the translation is right. In german it's dashboard --> aktionen --> interne Suche).

... What am I doing wrong?

There is an error. Please report the message and full backtrace in the Piwik forums (please do a Search first as it might have been reported already!).

Notice: Undefined property: Piwik_SiteSearch_Controller::$range in /webs/www.EXAMPLE.com/piwik/plugins/SiteSearch/Controller.php on line 34

Backtrace -->
#0 Piwik_ErrorHandler(...) called at [/webs/www.EXAMPLE.com/piwik/plugins/SiteSearch/Controller.php:34]#1 Piwik_SiteSearch_Controller->index(...) called at [:]#2 call_user_func_array(...) called at [/webs/www.EXAMPLE.com/piwik/core/FrontController.php:138]#3 Piwik_FrontController->dispatch(...) called at [/webs/www.EXAMPLE.com/htdocs/piwik/index.php:53]

Fatal error: Call to a member function getLocalizedLongString() on a non-object in /webs/www.EXAMPLE.com/piwik/plugins/SiteSearch/Controller.php on line 34
timo-bes commented 12 years ago

@tjorben: If you want to track result counts, see https://github.com/BeezyT/piwik-sitesearch/wiki If you want to use results tracking, add the following to your tracking code: piwikTracker.setCustomData({SiteSearch_Results: XX}); You can retrieve the number of results via JavaScript from the DOM or you can set the value when the website is generated (in PHP, Ruby or whatever you are using).

@gildesign: See https://github.com/BeezyT/piwik-sitesearch/issues/38. This is a know issue that won't be fixed in the github-version because SiteSearch will be integrated in Piwik Core soon. During that process, major parts will be overhauled and the problems will be fixed.

pebosi commented 12 years ago

Any updates on this, any testing/help needed?

kimtore commented 12 years ago

How's the progress on integrating this plugin into core? I cannot see any trace of it in the Subversion repository.

mattab commented 11 years ago

I'm working on it

mattab commented 11 years ago

(In [7190]) Refs #2992 Site Search KABOOM, Refs #5469 Implementing Site Search tracking & reporting in Piwik core!

mattab commented 11 years ago

(In [7192]) Refs #2992 #49 Message fix

mattab commented 11 years ago

(In [7194]) Refs #2992 #49

mattab commented 11 years ago

(In [7197]) Refs #2992 #49 Fixing the No result keyword bug

mattab commented 11 years ago

(In [7200]) Refs #2992 #49 Also updating schema

mattab commented 11 years ago

(In [7210]) Refs #2992 #49 enable transitions for the pages following site search reports

mattab commented 11 years ago

See documentation: Search Analytics

mattab commented 11 years ago

see follow up ticket: #3461

timo-bes commented 11 years ago

In 9e051a171c2734c88a61d51217e146e95c3b2594: refs #5469 remove "Others" row from site search report "keywords with no results"