Skip to main content
Inspiring
November 21, 2008
Question

website search term code

  • November 21, 2008
  • 4 replies
  • 435 views
I have a website with a search field that uses some basic sql to search the
web database.

For marketing purposes and to understand our customer better, we want to
learn what our customers are searching for on our website.

Whats the best way do you think to achieve this?

I could write each and every search term into a database? (cumbersome and
database table would grow out of control)

OR

I could put the search term and pass it as a url variable in the url
string. Then i could view google analytics and view the more popular url
strings. eg: www.xxxx.com/search.cfm?search=hard hats (bit clunky)


Can anyone suggest a better way of doing this?


This topic has been closed for replies.

4 replies

Inspiring
November 22, 2008
ok guys thanks for the replies. Just wanted to throw it out there.

Database it is with an incremental count.

"tclaremont" <webforumsuser@macromedia.com> wrote in message
news:gg6g6c$p5c$1@forums.macromedia.com...
> This is exactly what databases are for.
>
> I admit it gets cumbersome if you don't know how to develop a good
> database.
>
> Do you think the big search engines accomplish all they do without
> databases?
>


tclaremont
Inspiring
November 21, 2008
This is exactly what databases are for.

I admit it gets cumbersome if you don't know how to develop a good database.

Do you think the big search engines accomplish all they do without databases?
Inspiring
November 21, 2008
We use a database to do that.
Inspiring
November 21, 2008
why not use a database?
handling huge amounts of data is what they're for , right?

you could keep it cleaner by going relational - just a thought
when somebody enters a search, check the 'search terms' table... if it
does not already exist, insert it.
then, add a record to the 'searches run' table, with the ID of the term
and the date, whatever other info you want.

a simple query can pull all terms and a count of searches run for that
term's ID, or a list of dates, whatever... i think that's how I'd
approach it, if nothing better turns up...




Michael Evangelista, Evangelista Design
Web : www.mredesign.com Blog : www.miuaiga.com
Developer Newsgroups: news://forums.mredesign.com