Author Topic: How to track "user searches"  (Read 12960 times)

Rico Suave

  • Full Member
  • ***
  • Posts: 223
    • JoomingDales.com
How to track "user searches"
« on: March 29, 2007, 10:57:50 am »
I don't use the enhanced search function, just use the standard search from the VM Module on my website.

I want to track what people are searching for. How can I do that?

Any hints?

Daan

  • Beginner
  • *
  • Posts: 3
Re: How to track "user searches"
« Reply #1 on: April 16, 2007, 21:29:30 pm »
si si....

try to google the text TFSforjoomla....this works for me!!!

You will see:

IP adresses included their search words etc..
Visitors by country etc
and many more statistics

good luck!


turvas

  • Beginner
  • *
  • Posts: 6
Re: How to track "user searches"
« Reply #3 on: January 11, 2009, 13:03:40 pm »
another way is to use standard VM search and use Joomla Site Seach statistics for that, in VM 1.1.2 and J 1.5.8 works following: add following code snippet to virtuemart_parser.php, somewhere line 180, see it with preceding line:

$keyword = substr( urldecode( vmGet( $_REQUEST, 'keyword' )), 0, 50 );

// log the search in JoomlaSearch statistics by turvas
require_once(JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_search'.DS.'helpers'.DS.'search.php' );
SearchHelper::logSearch( $keyword);

turvas

  • Beginner
  • *
  • Posts: 6
Re: How to track "user searches"
« Reply #4 on: January 11, 2009, 13:24:17 pm »
small fix:
if (!empty($keyword)) {
  require_once(JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_search'.DS.'helpers'.DS.'search.php' );
  SearchHelper::logSearch( $keyword);
}

p.barg

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 136
    • Barg IT
Re: How to track "user searches"
« Reply #5 on: March 27, 2009, 08:43:47 am »
Hi,

any idea how this could be achieved with joomla 1.1?

-- Petra

yomasimo

  • Beginner
  • *
  • Posts: 6
Re: How to track "user searches"
« Reply #6 on: June 05, 2009, 22:27:15 pm »

I need to track searches for virtuemart 1.0.x on joomla 1.0.x

any clues?

lipes

  • Sr. Member
  • ****
  • Posts: 720
Re: How to track "user searches"
« Reply #7 on: August 28, 2011, 04:44:48 am »
great post Turvas  ... +1 to you!
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25

turvas

  • Beginner
  • *
  • Posts: 6
Re: How to track "user searches"
« Reply #8 on: February 16, 2014, 16:50:49 pm »
hi again,

just thought I will share my  experience for VM2, same topic - my previous solution works with different placement of code.
I found nice place for it in file components\com_virtuemart\views\category\tmpl\default.php around line 143 or better yet, copy this file to templates\<your template>\html\com_virtuemart\category and make modification there (so they are not lost with VM updates)
Code: [Select]
<?php
  
if (!empty($this->keyword)) {
// 2 lines added by turvas: log/record user searches
require_once(JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_search'.DS.'helpers'.DS.'search.php' );
SearchHelper::logSearch($this->keyword);
?>