Announcement

Collapse
No announcement yet.

What to put in the search query in google analytics

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What to put in the search query in google analytics

    We have google analytics and it is working just fine for us except for the site search tool. Because Miva does not change the URL, I don't know what to put in query parameters for the site search tool. Does anyone know?

    PS I apologize for running this twice; I think it was getting lost in the last post that I had with my other question.

    #2
    Re: What to put in the search query in google analytics

    The variable name for the built-in search feature is Search. If you are using another search tool, just do a view source on the page with the search form and check the name of the textbox input field.
    Susan Petracco
    NetBlazon

    1.866.400.2444

    _____________________________________________

    Like us on Facebook

    Comment


      #3
      Re: What to put in the search query in google analytics

      That is what I have in the field and it still isn't working (I put both Search and search). I double checked and made sure it was the name of the form and it is since I am using the Miva search function. Has anyone else had this problem? Website is www.nationalincontinence.com.

      Thanks

      Comment


        #4
        Re: What to put in the search query in google analytics

        Do you have it set to "Do Track Site Search", and "No, do not strip query parameters out of URL"?
        Susan Petracco
        NetBlazon

        1.866.400.2444

        _____________________________________________

        Like us on Facebook

        Comment


          #5
          Re: What to put in the search query in google analytics

          That will not work as Miva Merchant does not pass the "Search" query in the screen url. However you can pass the search query to Google Analytics using the proper custom template code.

          Comment


            #6
            Re: What to put in the search query in google analytics

            I fixed the problem. You do want to use the word "search" in google analytics and you do want to check the box for "no" as was suggested. The fix is to make it a "get" search instead of a "post". You can do this where the search box is declared. For me, it is in the global header.

            Thanks everyone!

            Comment


              #7
              Re: What to put in the search query in google analytics

              Originally posted by agarvey View Post
              I fixed the problem. You do want to use the word "search" in google analytics...
              Hello,

              Do you mean don't use "search", but do use "Search"? In other words, capitalize the "S"?

              Thank You.
              MacNichol Guitars and Mandolins

              Comment


                #8
                Re: What to put in the search query in google analytics

                I don't know if the capitalization makes a difference. I think the main thing that matters is that you pass the field as a "get" Below is the code that I used. I took out the <td><tr> tags:
                <form method="get" action="&mvt:global:sessionurl;">
                <input type="hidden" name="Store_Code" value="&mvte:store:code;">
                <input type="hidden" name="Screen" value="SRCH">

                <a href="http:storename.com/mm5/merchant.mvc?Screen=SRCH&Store_Code=NI">
                Search:
                </a>
                <input type="text" name="Search" size="18" value="&mvte:global:Search;">

                <mvt:item name="buttons" param="Search" />

                </form>

                Comment


                  #9
                  Re: What to put in the search query in google analytics

                  I'm pretty sure you do not have to change from post to get.
                  I like post better for many reasons.

                  From the ga analytics forum I found this from some people discussing this problem.

                  1. setup the search tracking just like you did, tell it to use the query string and also to strip it out.

                  2. use trackpageview() to create a virtual page containing in URL the requested parameter. Then you could easily use Site Search feature without a query string.

                  result: ga will use the trackpageview instead of the real url of the screen you are on.

                  All you need to do is use the mvt variable to insert into the ga code.
                  in your footer..

                  the whole url query string thing becomes a moot point.

                  You can do with storemorph inside the ga script something like
                  (this is part of a larger mvt if statement.. this is just a snippet that I'm goign to use)

                  <mvt:elseif expr="(g.screen EQ 'SRCH')">
                  pageTracker._trackPageview('/store/search.html?Search=&mvte:global:Search;');
                  <mvt:else>

                  I haven't tested this yet myself.. but I am going to tonight. I just stuck this into my footer code that outputs the ga script and the output looks right. I post here if I get good results or not.
                  Last edited by kayakbabe; 12-05-08, 06:08 PM.

                  Comment


                    #10
                    Re: What to put in the search query in google analytics

                    It's confirmed, you do not have to change your post to search on the form action
                    You CAN definitely use the google analytics trackpageview in order to make it work.
                    Just follow my directions above and wait 24 hours for the tracking to kick in.

                    It works great! I'm seeing all my insite searches. I put in some test searches just to make sure.
                    Last edited by kayakbabe; 12-08-08, 03:10 PM.

                    Comment

                    Working...
                    X