4 Replies Latest reply on Nov 21, 2008 8:18 PM by Newsgroup_User

    website search term code

    Level 7
      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?


        • 1. Re: website search term code
          Level 7
          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
          • 2. Re: website search term code
            Dan Bracuk Level 5
            We use a database to do that.
            • 3. Re: website search term code
              tclaremont Level 2
              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?
              • 4. Re: website search term code
                Level 7
                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?
                >