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
Plugin Internal search tracking - search analytics reports #5469
Comments
I’m subscribing, as this is an important feature we already have in the Drupal module for Goggle Analytics and is currently commented out in Piwik module. |
Google is good at analysing search quality / search in general. We can get ideas from how google analytics does internal search tracking. Site search General http://www.google.com/support/googleanalytics/bin/static.py?page=troubleshooter.cs&problem=gatsc&selected=a10h1_a10h1t3_&ctx=gatsc_a10h1_a10h1t3__77234&aw_referral= Google Analytics uses the following formulas to calculate the metrics used in internal site search reports: ```
This section describes a visitor’s experience with your website’s search engine and explains how Google Analytics calculates the resulting data. The visitor progresses through three different pages when interacting with your website’s search engine: ```
Assuming your website received three visits from visitors that navigate as described…: ```
…The following metrics can now be calculated: ```
|
Any progress with this plugin? Is there a dev version of it somewhere? Are there any other plugins like this? |
Hi, have there been any new developments on this issue? We'd love to see an internal search feature in Piwik as soon as possible because in our opinion it's one of the most important features that are still missing in comparison to commercial tools like Google Analytics. I'm working for a small web agency and we would like to start implementing this feature, or offer our help if there's already someone working on it. :-) Benjamin |
Benjamin: afaik, no is working on it; so, feel free to implement and share. |
Hey guys, I gave this plugin a try (it's my first Piwik plugin, so every suggestion is welcome). The menu items are registered, I extended the site table by columns for url and search parameter name. The settings area is working. Now, the logs have to be analyzed. As far as I can see, there are no existing API methods, that would provide adequate functionality. This whole DataTable business seems to be pretty complex (but cool!), so I'd really appreciate it, if somebody would help me get started with this (Documentation, Tips or Code). What I have done so far can be found on github: http://github.com/BeezyT/piwik-sitesearch I know, Piwik uses SVN, but github can be accessed via SVN as well: svn checkout https://svn.github.com/BeezyT/piwik-sitesearch Thanks for your help, Timo |
I just pushed the first version of the keyword analysis to github (including screenshots).
|
The plugin is making good progress... Have a look at the github wiki for up to date information: |
Looks quite good. However I was you're using mysql_real_escape_string and probably other mysql_* specific functions (e.g. http://github.com/BeezyT/piwik-sitesearch/blob/master/SiteSearch.php#L117). You should use the second argument of Piwik_Query to work with parameterised queries (Piwik_Query($sqlQuery, $parameters)) and therefore allow other database backends (in future). |
Thanks for your feedback (also the other open issues on github)! I see, why I souldn't use the mysql functions. I replaced the parameters in a query with ? and passed the second argument to Piwik_FetchAll. Now the query is not working anymore, and I can't find a way to debug. How can I find out, what the query looks like when it is executed? |
It looks very interesting start! Are you interested to have such plugin included in Piwik core? if so, we would need to review the schema updates (to process metrics above, visits per search, total search, search exits, etc.). Tracker:
Archiving: the plugin doesn't do archiving currently, I understand you pointed out code was not reusable. Indeed because you are doing "new" metrics in the Piwik world :-) but technically your code should archive data using the same mechanism used, for example, in the Visits by Server Time. You can then lookup query enrich*() in ArchiveProcessing, to see what you would base your query on. Your integration of Search Results using custom data is very cool!! First cool use case of this function. And your code looks really good. This would be amazing to have in Piwik core for sure :) |
Thanks for the feedback, matt. I know that performance is a huge issue at the moment. To be honest, I didn't care much about it yet since it's still more a proof of concept. At the moment, I'm adding a search refinements feature, which is the last of the must-haves. This is probably the most performance critical, I think, we have to extend the schema a little more to get efficiency. Archiving would be great, I read a lot of code, but I still don't get how it's done :-(. Some sort of documentation about that would be great, but I guess, the target group isn't that big... So if you (or anybody else) have the time, feel free to fork the project and get the archiving process started. I'm very open to collaboration! What does including the plugin in piwik core mean? That is comes with piwik by default? That would be great, but I'd like to keep working on it (at least as much as I have time for it). Can we find a solution for a common version control? I'd be happy to stick with github, but if you guys have a better suggestion, I'm open... |
github is perfect for now until the code is maybe ready, and committed to SVN trunk. Then you could have SVN commit and be part of the team if it interests you :) Before that, it would need to be in line with other plugins in terms of performance and vision. Yours is a great start so promising. Regarding Archiving, the big idea is to query the logs GROUPED BY a given entity (eg. keyword), and then request common stats for all keywords (visits, pages, avg time on site, bounce count, etc.). The helpers in ArchiveProcessing/* are doing this. Let us know how it goes. good luck! |
I started implementing the archiving process, and I'm not sure what the best solution is. What I did:
I only implemented this for the keyword overview and for the day archive. Before I go on, please have a look and tell me whether that's what you had in mind... |
Quick question: is the code working in its current state? The concept of archiving in Piwik is explained briefly in: http://dev.piwik.org/trac/wiki/DatabaseSchema#Archiveddata Idea is:
Let me know if you need specific guidance. |
Thanks for the comment. I had most of that figured out by now, but still it's good to know, that there is documentation ;-) I have some specific questions: When the user clicks a keyword, the plugin shows statistics for that keyword only (following pages, previous pages, evolution, search refinements).
I haven't worked on the plugin for a few days now, and I won't have much time for the next 4 weeks or so, but after that, I'm planning to finish the the first beta version within a few weeks. |
|
The metrics stored on a per keyword basis are:
At the moment, only the first two metrics are archived, and it still takes a long time to complete, when there are many keywords. Have a look at http://github.com/BeezyT/piwik-sitesearch/blob/master/Archive.php (method archiveDay). The main performance issue is, that I have to analyze the actions (not only the visits) a lot - for every keyword. Here are some more specific questions:
Thanks for your help, matt! I really appreciate it. |
EZdesign, sorry for the delay. Have you made further progress?
|
Thanks for the feedback, it helped getting the additional archiving time for my test database down from 100 to 5 seconds ;-) I'll let you know, when I have some more specific questions. |
The plugin is making great progress, everything uses archiving and seems to work now. You could say, that we have reached the first beta version. If you have any bug reports, please create issues on github. There is one problem I'm having with the evolution graph, that I can't figure out. Have a look at this screenshot: http://github.com/downloads/BeezyT/piwik-sitesearch/Percentage.png The axis is not scaled properly... The Controller method is called searchPercentage, the API method is getSearchPercentageEvolution. Did anybody have this problem before? Is it a bug or am I doing something wrong?? Btw, if you had the plugin installed previously and want to update to the latest version, remove the schema changes from piwik_site and piwik_log_action by hand, run the install method again and then check "analyze urls now" in the settings. |
Please test against trunk. In fixing #1562 (displaying goal conversation rates, i.e., percentages), we've made some changes to the visualization code. |
The ticket is about exactly the same problem, but unsing trunk didn't help. |
When you use ColumnCallbackAddColumnPercentage, the result is a localized number with a '%'. This locale-specific format works well when displayed in the table, but it's a string, not a number. When the Visualization code goes to find the max value, PHP's max() function does a string comparison, so "13.5%" is "bigger" than "100%". We also run into an issue with locales. Consider 3/4. In "en_US.UTF-8", this would become "0.75%". In "de_DE.UTF-8", this becomes "0,75%". Casting to (float) isn't locale-aware. Can you use ColumnCallbackReplace with Piwik::getPercentageSafe? re: search_percentage. core/ViewDataTable/GenerateGraphData/ChartEvolution.php will guess the unit from the column name. We can add _percentage to the list, or you can use _rate (e.g., search_rate), or you can explicitly set the Y-axis unit ('%'). |
You hit the nail on the head with that response! Works fine now. I just released v0.1.2: it includes the fix and some widgets I added yesterday. If you want to test / use the plugin, I recommend using only the commits tagged with a version number. They should be more or less stable. If you don't want to use git or svn to access github, there are tgz/zip archives of the releases in the downloads section on github. Looking forward to your feedback... |
Timo: your code is missing a license statement. |
Hey guys, I was just checking out repopular (http://repopular.com/) and what do I see on the first page? My plugin! Thanks for the publicity, are you using it? @vipsoft: what license do you recommend? What do I need to pick, so you can add it to the core when the time is right? |
Must have been my tweet. The license is up to you. For inclusion with Piwik core, we require that it be GPL v3 compatible, e.g., GPL v3, BSD, MIT, or LGPL v3. Affero GPL v3 isn't strictly compatible, but is also allowed. |
Are you able to add this site search plugin to the latest code? |
Thanks for your interest in the plugin, jens. There are plans to integrate the plugin in Piwik core. It's not certain yet, but they might be realized very soon as part of a sponsored project. If we integrate it in core, most of it will be overhauled (especially the backend) which means you wound have to set it up again and the reports would start from scratch as well. If you want to analyze your internal search now, go ahead and use the plugin from github. It works well for many users. For a more performant core version, keep an eye on this ticket. |
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'. |
Have you tried pressing refresh in you browser? You might need to reload a JS file. |
Replying to EZdesign:
Doh. Yep, needed a full browser refresh for reloading JS file. Thanks! |
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}"> </tr>to:<tr searchterm="{$row.metadata.searchTerm|utf8_decode}" id_search="{$row.metadata.idSearch}" test="test"> </tr>Above, the following two parts were changed.
Not sure if it is the way I'm using the plugin that required the above change. |
Sorry for the formatting, here it is again - Original:
Changed:
|
Hi, 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: any idea where my problem is? Thx and Bye |
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. |
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. |
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 |
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?
|
@Tjorben: If you want to track result counts, see https://github.com/BeezyT/piwik-sitesearch/wiki @gildesign: See BeezyT/piwik-sitesearch#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. |
Any updates on this, any testing/help needed? |
How's the progress on integrating this plugin into core? I cannot see any trace of it in the Subversion repository. |
I'm working on it |
(In [7190]) Refs #2992 Site Search KABOOM, Refs #5469
|
See documentation: Search Analytics |
see follow up ticket: #3461 |
Piwik now has [internal search keywords tracking](http://piwik.org/docs/site-search/). Awesome!
Functionnality:
- specify an URL + parameter for the internal search query
- give the general metrics: number of searches, visits with searches, unique searches, etc. (see comment below)
- display the list of internal searches in a new report under Actions
- can we auto detect google CSE? #426
- [see hack 64 & 65 in peterson’s book](http://books.google.com/books?id=v3ebu7RJT3oC&lpg=PP1&ots=-D2kqTg_07&dq=eric%20perterson%20Web%20%20Site%20Measurement%20Hacks%3A&pg=PA253#v=onepage&q&f=false)
The text was updated successfully, but these errors were encountered: