Advertisement:

Author Topic: How to capture the keywords that are searched  (Read 1406 times)

bengalliboy

  • Full Member
  • ***
  • Posts: 204
How to capture the keywords that are searched
« on: February 10, 2015, 04:57:36 am »
I want to capture the top or most searched words with a link to the search results. Something like top searches on the site.
Any idea? Thanks

Hussard (Madhouse)

  • Full Member
  • ***
  • Posts: 214
  • Outlaw web developer & padawan designer.
Re: How to capture the keywords that are searched
« Reply #1 on: February 19, 2015, 12:47:00 pm »
You'll probably have to do a plugin that hooks up on search to register the keyword.

We did it on our website as part as our search to know which location a user enters in the field (and do some caching too ;) ).

Hook to use:

Code: [Select]
osc_add_hook('search_conditions', 'mdh_google_maps_search_conditions');

In your function:
  • Check if your keyword exists in your table
  • If it does NOT, insert(), setting the number of views of the keyword to 1.
  • If it does, updateByPrimaryKey() increasing the number of views by 1.


Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Re: How to capture the keywords that are searched
« Reply #2 on: September 13, 2015, 09:23:21 pm »
You'll probably have to do a plugin that hooks up on search to register the keyword.

We did it on our website as part as our search to know which location a user enters in the field (and do some caching too ;) ).

Hook to use:

Code: [Select]
osc_add_hook('search_conditions', 'mdh_google_maps_search_conditions');

In your function:
  • Check if your keyword exists in your table
  • If it does NOT, insert(), setting the number of views of the keyword to 1.
  • If it does, updateByPrimaryKey() increasing the number of views by 1.

Any plans to develop such plugin?
I am interested into such solution. Can it be done to have a list of most searched for each individual category? In the end we should see on any main category a selection of x most searched items, coresponding to each category. And olso, if posible, have a badwords section where we can add the keywords that we do not want to show.

bengalliboy

  • Full Member
  • ***
  • Posts: 204
Re: How to capture the keywords that are searched
« Reply #3 on: October 07, 2015, 03:38:06 pm »
Yes In my site it is capturing on a table now. Google can also do that
my site is: bazaar.city