Website search term code

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?

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

Similar Messages

  • Show search term in URL (for google analytics)

    Hi there,
    I was hoping someone might have advice for a newbie question.
    When someone searches on our website we'd love to know WHAT they are searching on
    (this would allow us to create more products based on searches - e.g if lots of people are searching for Red then we'll create more Red products..)
    Our website is: http://www.angelaromatics.com.au
    The search url is currently coming up as: http://www.angelaromatics.com.au/Default.aspx?A=ProductSearch&ID=/search-results&SE=True
    Our search section is set up as:
    [code]
    <form name="catsearchform5878" action="/Default.aspx?A=ProductSearch&amp;ID=/search-results&amp;SE=True" method="post" class="search">
        <input type="text" name="CAT_ProductSearch" class="entry_form" placeholder="Search our products here..." />
        <button type="submit">Submit</button>
    </form>
    [/code]
    Is there anyway to get into the URL the query / search term (so google analytics will list it in results)?
    I'd love any advice

    consider the query result (short description) as a string (say String S1). Use string tokenizer and get each word as a token. consider your search query(eg: cold) as another string (say string S2). check for each token if it is equal to your string S2, show it as bold(using <b>) else print it as it is.
    I hope this helps.

  • CRM 5.0 - IC WebClient - BP Search Term 1 - Method

    Hi Gurus
    Does anyone know of a SAP Standard Method to retrieve Search Term 1 for the Business Partner (Customer). I want to display the value in the Identify Account View
    Thanks
    Panduranga

    Here Are the steps which I did and tested the new QUERY in transcation GENIL_BOL_BROWSER, it is working fine. I am yet to change BSP level.
    I followed the instructions in the IMG(CRM> CRM Cross applicationComponents>GenIL > Component Specific> Extend Object model for business partner) to extend the search.
    To implement your own search, for example, new search parameters, or to filter the search results by your own criteria:
    1. Create a new structure ZCRMST_HEADER_SEARCH_BUIL   as copy of CRMST_HEADER_SEARCH_BUIL and add the new fields to the new structure.
    2. In Object Definition, define a name(ZBuilHeaderSearch) for the new search query and assign the new structure(ZCRMST_HEADER_SEARCH_BUIL) name to the new object, also enter ROOT object "BuilHeader".
    3. Create a class ZCL_BUIL_HEADER as subclass of CL_BUIL_HEADER.
    4. in IMG again assign this class to the external object name.
    5. Implement GET_RESULT_TABLE method in ZCL_BUIL_HEADER class with the following extra code apart from existing code in the super class.
      Data:   lv_sort1  type bu_sort1,
              lv_sort2  type bu_sort2.
      lv_sort1 = ls_header_search-search1.
      lv_sort2 = ls_header_search-search2.
    pass above two parameters to 'TREX_BUPA_SEARCH' Function module which is present in the GET_RESULE_TABLE method.
    6. Test your query in the GENIL_BOL_BROWSER.
    I am getting correct result.
    regards,
    Laxman

  • The boxes where I would type in search terms and URL are GONE! So is the BACK BUTTON. HELP!

    I downloaded software to convert jpg files to pdf's, and it worked. however, I think it installed Incredimail, and I suspect that it installed Ask.com - neither of which I wanted. It was just after that that my back arrow and my boxes where i type in search terms and urls DISAPPEARED! Firefox is compatible with some important websites and has features that i need. NEED.

    Make sure that you do not run Firefox in Full Screen mode with all toolbars hidden.
    * Press F11 to toggle full screen mode (Firefox/File > Full Screen)
    If the menu bar is hidden then press the F10 key or hold down the Alt key, that should make the menu bar appear.
    Make sure that toolbars like the "Navigation Toolbar" and the "Bookmarks Toolbar" are visible: "View > Toolbars"
    * If items are missing then open the Customize window via "View > Toolbars > Customize" or via "Firefox > Options > Toolbar Layout" (Linux, Windows)
    * If a missing item is in the toolbar palette then drag it back from the Customize window on the toolbar
    * If you do not see an item on a toolbar and in the toolbar palette then click the "Restore Default Set" button to restore the default toolbar set up.
    See also:
    * http://kb.mozillazine.org/Toolbar_customization
    * https://support.mozilla.com/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • Search Term in Search Help for SAP Users - su01

    Hello ,
    we want to use the search Term fields in the user data. (T-Code SU01)
    As I read in the F1 help, these Fields should be available in the F4 Matchcode for Users?
    But there is no field available? Any Ideas?
    SAP ECC6.0
    SP Stack 13
    Regards
    Tobias Werner

    When you open the User data with t-code su01 , there are 2 fields named "Search Term 1/ 2".
    huh?.... not really following you. when you open user data in SU01 you see well... the user data.
    Regards
    Juan

  • Error when submitting a search term

    Hi,
    I use SAP EP6 SP6 together KM SP6 and WebAS 6.40 and TREX 6.01.
    I'm implementing a repository manager for a CMS, and everthing works fine within the KM browser.
    When I enter a search term and press the submit button, the following error message is displayed
    com.sapportals.wdf.WdfError
         at com.sapportals.wdf.WdfCompositeController.buildComposition(WdfCompositeController.java:678)
         at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:32)
         at com.sapportals.htmlb.Container.preRender(Container.java:118)
         at com.sapportals.htmlb.Container.preRender(Container.java:118)
         at com.sapportals.htmlb.Container.preRender(Container.java:118)
         at com.sapportals.htmlb.rendering.PageContext.render(PageContext.java:924)
    --- Nested WDF Error -
    java.lang.NullPointerException
         at com.sapportals.wcm.control.search.SearchDialogControl.readConfiguration(SearchDialogControl.java:831)
         at com.sapportals.wcm.control.search.SearchDialogControl.createNestedControls(SearchDialogControl.java:270)
         at com.sapportals.wdf.stack.Control.create(Control.java:274)
         at com.sapportals.wdf.stack.Pane.createControls(Pane.java:464)
         at com.sapportals.wdf.stack.PaneStack.createControls(PaneStack.java:479)
         at com.sapportals.wdf.stack.Pane.createControls(Pane.java:458)
         at com.sapportals.wdf.stack.PaneStack.createControls(PaneStack.java:479)
         at com.sapportals.wdf.WdfCompositeController.doInitialization(WdfCompositeController.java:268)
         at com.sapportals.wdf.WdfCompositeController.buildComposition(WdfCompositeController.java:659)
         at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:32)
         at com.sapportals.htmlb.Container.preRender(Container.java:118)
         at com.sapportals.htmlb.Container.preRender(Container.java:118)
         at com.sapportals.htmlb.Container.preRender(Container.java:118)
         at com.sapportals.htmlb.rendering.PageContext.render(PageContext.java:924)
         at com.sapportals.htmlb.page.DynPage.doOutput(DynPage.java:237)
         at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:109)
    This also happens when I undeploy my repository manager application, so I don't think that this has something to do with my code. Also I'm not really sure if the search ever worked, since I tried it the first time to test if my repository manager content is indexed and found in the portal's search.
    But when looking at the stack trace it seems to me that only standard rendering and configuration components belonging to the search iView are involved.
    Does anyone have an idea where that error comes from and what might be done to get it working?
    Thanks for any hint!
    Regards
    Torsten

    Hi Torsten,
    this seems to be a real standard problem. Could you open an OSS to this error and put the Java StackTrace on it. This would be very helpful.
    Thanks and regards,
    Thilo

  • BAPI to create bp with name, search term, address and Authorization Group

    Hi
      which BAPI could be used to create Business Partner (type organazation) with names, search term, address and the Authorization Group field.
      ths

    Hello ,
    You can use : BAPI_BUPA_CREATE_FROM_DATA
    In case you need to update additional fragments just search in trn code SE37  for BAPI_BUPA_*CREATE.
    For example BAPI_BUPA_FRG0040_CREATE - Create classification data for BP , etc'.
    Additional you can use XIF :CRMXIF_PARTNER_SAVE to create business partners
    Rika

  • Websites for downloading code-templates (java and jsp) existing ?

    Hi,
    I'm searching for a website, offering code examples or templates (in java and jsp) for downloading.
    For example: A code for creating a new xml-file, login-procedure or sending an e-mail with a java-program, I can customize.
    I know, for asp.net such websites for downloading code-templates are existing (e.g. a German website: http://www.aspheute.com).
    So I think for java and jsp those sites will also be existing�
    Does anyone know some links ?
    bye
    Chris

    Yes, with google - I'll surely find some matches, but I'm looking for links and websites which will be provided by personal experiences.
    With google - you won't find any personal experiences...
    bye
    Chris

  • Component to Search AS2 Code

    I am trying to figure out a way to search the code and frames of an FLA and return the results that can be printed or at least displayed some way on screen.
    We have hundreds of Computer Based Training (CBT) Flash movies that need to be updated periodically. Each FLA has several frames which represent separate lessons. My dilemma is that in order to update an acronym, for instance, I'd have to open each FLA and look into each frame. I'd like to automate the process and be able to enter search criteria and then have the component spit out all instances of the acronym (or whatever) and also tell me on which frame each instance exists. To compound the issue external SWFs are loaded into some of the frames.
    Is there a way to do this with a component or maybe jsfl? Is there a way to report which frame the playhead is on when the search criteria is found? Although I think this is impossible, is there a way to jump into an externally loaded SWF and search the frames it contains for the search criteria?
    Any help is greatly appreciated.
    Thanks

    well, here's more of that code.  it's from a jsfl file that finds specific actionscript strings and replaces it with other actionscript.  all timelines that are used or could be used are searched for actionscript:
    var doc = fl.getDocumentDOM();
    var rootTL = doc.getTimeline();
    var checked_mcA = [];
    // *** begin initializations
    // array of replacement arrays.  first term is searched and replaced by 2nd.
    // example:
    //var replacementA = [["new Sound()","new Sound(this)"],[" 'audio/","pathS+'audio/"]];
    var replacementA = [["._x+357","._x+350"]];
    // *** end initializations
    //fl.trace(doc.name);
    findAS(rootTL);
    //findLibrary_mcAS();
    //fl.saveDocumentAs(doc);
    fl.saveDocumentAs(doc);
    function findAS(tl) {
        if(tl==rootTL){
            for (var layerIndex = 0; layerIndex<tl.layers.length; layerIndex++) {
                for (var frameIndex = 0; frameIndex<700; frameIndex++) {
                //for (var frameIndex = 0; frameIndex<tl.layers[layerIndex].frameCount; frameIndex++) {
                    //fl.trace(frameIndex+" : "+tl.layers[layerIndex].frameCount);
                    if(tl.layers[layerIndex].frames[frameIndex]!=undefined&&tl.layers[layerIndex].frames[fram eIndex]!=null){
                        //fl.trace(tl.name+" : "+tl.layers[layerIndex].name+" "+frameIndex);
                        findASinLayerFrame(tl, frameIndex, layerIndex);
        } else {
            for (var layerIndex = 0; layerIndex<tl.layers.length; layerIndex++) {
                for (var frameIndex = 0; frameIndex<tl.layers[layerIndex].frameCount; frameIndex++) {
                    findASinLayerFrame(tl, frameIndex, layerIndex);
                // end frameIndex
            // end layerIndex
    function findASinLayerFrame(tl, frameIndex, layerIndex) {
        //fl.trace(tl.layers[layerIndex].name+" :: "+layerIndex+" ::: "+frameIndex+" "+tl.layers[layerIndex].frames[frameIndex].startFrame);
        if (tl.layers[layerIndex].frames[frameIndex].startFrame == frameIndex) {
            // edit actionscript, if any, attached to this frame/layer.  actionscript only on keyframes (hence, start_frame=frameIndex)
            var as = tl.layers[layerIndex].frames[frameIndex].actionScript;
            if (editNeeded(as)) {
                //fl.trace("frameIndex: "+frameIndex);
                as = editAS(as);
                //fl.trace(tl.name);
            tl.layers[layerIndex].frames[frameIndex].actionScript = as;
            //fl.trace("****");
            // find components/movieclips/buttons that could have actionscript attached to this tl/layer/frame
            //elementA = tl.layers[layerIndex].frames[frameIndex].elements;
            //fl.trace(tl.layers[layerIndex].frames[frameIndex].elements.length);
            for (var eNum = 0; eNum<tl.layers[layerIndex].frames[frameIndex].elements.length; eNum++) {
                if (tl.layers[layerIndex].frames[frameIndex].elements[eNum].elementType == "instance") {
                    libItem = tl.layers[layerIndex].frames[frameIndex].elements[eNum].libraryItem;
                    //fl.trace(tl.layers[layerIndex].frames[frameIndex].elements[eNum].libraryItem.name+" "+tl.layers[layerIndex].frames[frameIndex].elements[eNum].elementType+" "+tl.layers[layerIndex].frames[frameIndex].elements[eNum].libraryItem.itemType)
                    // check for code directly attached to this instance, if button
                    // anything in library derives from Item object.  item objects have itemType property
                    // tl.layers[layerIndex].frames[frameIndex].elements[eNum] is a SymbolInstance and therefore as an actionScript property
                    if (libItem.itemType == "button") {
                        if (editNeeded(tl.layers[layerIndex].frames[frameIndex].elements[eNum].actionScript)) {
                            tl.layers[layerIndex].frames[frameIndex].elements[eNum].actionScript = editAS(tl.layers[layerIndex].frames[frameIndex].elements[eNum].actionScript);
                    // check for code directly attached to this instance, if component
                    if (libItem.itemType == "component") {
                        if (editNeeded(tl.layers[layerIndex].frames[frameIndex].elements[eNum].actionScript)) {
                            tl.layers[layerIndex].frames[frameIndex].elements[eNum].actionScript = editAS(tl.layers[layerIndex].frames[frameIndex].elements[eNum].actionScript);
                    if (libItem.itemType == "movie clip") {
                        // check for code directly attached to this instance, if movieclip
                        if (editNeeded(tl.layers[layerIndex].frames[frameIndex].elements[eNum].actionScript)) {
                            tl.layers[layerIndex].frames[frameIndex].elements[eNum].actionScript = editAS(tl.layers[layerIndex].frames[frameIndex].elements[eNum].actionScript);
                        // and then check if this is a movieclip that has code on its timeline  
                        // or other movieclips/buttons on its timeline etc
                        // linked library items checked from findLibrary_mcAS.  relative path difficult because library items may be attached to any timeline
                        // and in fact, the same library item may be attached to different timelines and have different relative paths
                        if (!memberOfA(checked_mcA, libItem)) {
                            //fl.trace("libItem "+libItem.name);
                            checked_mcA.push(libItem);
                            findAS(libItem.timeline);
                    //end itemType = "movie clip"
                // end if-elementyType=="instance"
            //end eNum loop
        // end if-startFrame
    function findLibrary_mcAS(){
        libraryItemsA = doc.library.items;
        for (var libItemNum = 0; libItemNum<libraryItemsA.length; libItemNum++) {
            libraryItem = libraryItemsA[libItemNum];
            if (libraryItem.linkageExportForAS && !memberOfA(checked_mcA,libraryItem) && libraryItem.itemType == "movie clip") {
                checked_mcA.push(libraryItem);
                findAS(libraryItem.timeline);
    function editAS(as){
        for(var rIndex=0;rIndex<replacementA.length;rIndex++){
            as = as.split(replacementA[rIndex][0]).join(replacementA[rIndex][1]);
        return as;
    function editNeeded(as){
        if(as==undefined||as==null){
            return false;
        } else {
            if(as.length>0){
                for(var rIndex=0;rIndex<replacementA.length;rIndex++){
                    if(as.indexOf(replacementA[rIndex][0])>-1 && as.indexOf    (replacementA[rIndex][1])==-1){
                        return true;
                // as defined, as.length>0, no replacement strings found
                return false;
            } else {
                // as defined,as.length==0
                return false;
    function memberOfA(a,e){
        for(i=0;i<a.length;i++){
            if(a[i]==e){
                return true;
        return false;

  • Information in the notification address "Search Term 1/2".

    Hi Experts
    In my company we populate information in the notification address "Search Term 1/2". We can use this information to filter upon execution of reports IW28/9. However this information does not appear on any of the report output. Does anyone have an idea how this fields can be included on the report outputs?

    Hi,
    Modify your layout
    select coloumns like Address no.,postal code,region,location,street etc in your layout. prior to that you must maintain this information in customer master.
    kapil
    Edited by: Kapildev Farakte on Nov 2, 2009 12:51 PM

  • Modify Vendor Search Term # 2 While Saving.

    Hi Experts,
    I'm trying to modify and save trought a BADI VENDOR_ADD_DATA -> SAVE_DATA the search term #2. i've typed the following code to try it, but it does´nt make any change, please help me :
    DATA: sort1(30),
              sort2(30),
              zsendvalue TYPE addr1_data-sort1,
              zreturnedvalue TYPE addr1_data-sort2.
      FIELD-SYMBOLS:  = zpatrono.

    use user exit - SAPMF02K

  • Update Vendor Search Term #2 after saving.

    Hello Xprts,
    I've been trying by several ways to update the search term #2 of the vendor master data transaction (xk01) after saving the record. The tcode has 2 badi's : VENDOR_ADD_DATA and VENDOR_ADD_DATA_CD but none of them has the right Method to update after saving a record, like "BEFORE_UPDATE". I developed a FM and try to call it by a UPDATE TASK with a CALL TRANSACTION XK02 in update mode with a batch input code but i also can't update in that mode. Does anybody knows another badi, event, method to clear this sceneraio. i'll really appreciate the help.
    Regards,
    Steve.

    use user exit - SAPMF02K

  • Vendor Search Term 2

    Dear  Friends,
    I want to make mandatory field of search term 2 in vendoe master creation for some paricular vendor type.I have checked in vendor configuration by T Code OMSG, but there is no option for search term 2.please help me...
    Regards,
    Dishant

    hi,
    try in   OMSG   in the search term b make it as req.entery then and save
    and check it once search term 2 is allways as mandatory  field in  at the time of vendor creation in standerd.
    thanking you

  • Jump to search term in a query output...

    Hi,
    I have the results of a query outputted in a table. Depending
    on the user, this can be a longish query - maybe 100+ results. All
    these results have a checkbox next to them. The user checks the
    records they need to select, then submits the form to take that
    list of records in the "check" variable to another page which
    processes it.
    What I'd like to be able to do is provide a search box on top
    of this table, for the user to type in a search term in the record
    they want to find. Then, I'd like the page to jump down to that
    record so the user can check it. But here's the kicker - I don't
    want to lose any other already-checked boxes. So the form variable
    needs to persist, even if this is done multiple times.
    Any ideas on how this might be accomplished? I don't mind if
    the search has to be tied just to one field, etc. And I'm not
    asking anyone to write the code for me. Just point me in the
    direction of the right technique/technology, if ya can.
    Thank you!

    Hi,
    It might be worth checking out some of the Ajax libraries for
    this. jQuery (
    http://jquery.com) has a plugin
    called ScrollTo (
    http://plugins.jquery.com/project/ScrollTo)
    that lets you easily scroll to a specific position or element (or
    other) item on a page. The developer has more details on his site (
    http://flesler.blogspot.com/2007/10/jqueryscrollto.html).
    You could use the ScrollTo plugin in concert with one of the
    Auto Complete plugins for jQuery (one of them:
    http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/).
    Hope that helps get you started.

  • What character splits search terms (for different search result tabs), searching from the search box.

    When we type in a search term, in the search box, the results can be shown in a tab. But how can you split search terms while entering them all at once, each search term providing results in a new tab.
    "Search Term|Search Term Two", using |;\ etc only sends the term in entirety beyond. What does this box handle and how to make it open two tabs when given two separated search terms.
    So what is this special character or setting?
    Thank You

    Thank u so Bruce , I finally found an answer to my question.
    The solution u provided looks complete except that i am confused by the meaning of strField , may i didnt provide more details in my  post .
    The strField var i provided earlier was not meant to be placed in my code  , the correct one is shown below .However , the strField means according to me is the field against which the search operation should take place based on the ( search Term )
    the user provided . 
    Here is the code after applying the solution u suggested :
    'Information collected from the user      
     strWhereToSearch = IIf(.framSearchIn.Value = 1, "[quknotSubject]", "[quknotBody] ")       
    strCondition = strWhereToSearch & "  Like '* " & strTextSearch & " *' OR " & _
    strWhereToSearch & " Like '" & strTextSearch & " *' OR " & _ 
    strWhereToSearch & "Like '* " & strTextSearch & "'" 
    'Fill result search  Recordset      
    strSql = " Select  * from qryExtraTool_QuickNoteSubCatMainCat   "         
    strSql = strSql & " WHERE   " & strCondition & "  ORDER BY quknotDate"  
    'Control Source for the text box to display matches. ( Highlight the search word )     
    txtQuickNoteBody = SearchHilight(strWhereToSearch, strTextSearch)
    Tell me if my implementation to your code is right ?
    Thank u again Bruce ...

Maybe you are looking for

  • Acrobat 9 Standard converting to PDF

    When converting docs from Word to PDF, we use the Adobe Distiller to make the PDFs readable for users of Adobe 5.0 (It seems to be a popular version for visitor to our website). We recently upgraded to Adobe 9 Standard, and the files created cannot b

  • Using Mail with gmail (first time setup)

    I have been using gmail for years. I usually just use the webbased email so that I can check it from any computer. Now I'm interested in setting up Mail because I'm getting an ipod touch next week and I want to be able to use the Mail program on that

  • How to use ternary operator in JSF using EL expression

    how to use ternary operator in JSF using EL expression

  • Bank Reconciliation based on assignement field

    Hi, During execution of bank reconciliation, system is clearing opoen items based on amount(WRBTR). The requirements is to clear the open items based on assignment field. I have not maintained any algorithm for transaction types. Let me know the sett

  • AutoCreate is only creating a PO with 1 line from a 3 line Req

    Hi to All, I have my purchasing team running into this problem. There is requisition that has 3 lines which are the same item description quantity by different price. So when we AutoCreate it picks up the first line and times it by 3. Thus giving the