Google add site to search

how to implement google site search and google search within site and google site search jquery
ErrolFord Profile Pic
ErrolFord,France,Professional
Published Date:03-08-2017
Your Website URL(Optional)
Comment
Site Search One of Google Analytics’ “hidden treasures” that can help uncover some amaz- ing insights into the pulse of your web site’s trafc fi is the Site Search section of reports, which is located within the Content section of your “Favorite” profile. Site Search can collect the actual search queries performed on your own web site’s search function, including the number of refinements your visitors need to make, the page that they perform their searches on, and the category that the search query falls under, just to name a few. This section of reports is a direct pipeline of data between you the web-site owner and your web site’s visitors. One of the very few ways in which your site’s visitors can communicate with your web site is by what they type into your search tool. Cong fi uring Your Profile(s) In order to begin tracking your web site’s search function with Google Analytics, you need to perform a few administrative tasks first. In most situations, this should be a piece of cake for your administrator (and if that means you, then you’ll definitely be able to appreciate how easy this is going to be). 341 342 Part IVn The Reports n o t e Depending on your search function’s vendor, there may be additional steps that need to be performed, such as ensuring that your web site is con- figured for subdomain or cross-domain tracking, or using the Google Analytics Tracking Code to dynamically populate the search query if it does not appear in the URL. Check with your site search vendor to ensure that it can accommo- date Google Analytics tracking. 1. Log in to your Google Analytics Account and click the Edit link under- neath the Actions column on the far right of your Account Overview screen. 2. Next, click the white Edit link on the top right of the Main Website Prol fi e Information page. Scroll down to the bottom to find the Site Search sec- tion, and click Do Track Site Search, which will make these form fields appear (Figure 18-1): Figure 18-1: Site Search configuration options 3. Next, you must perform a search on your web site and find your search query parameter. There are thousands of different types of search fea- tures, but if you’re using Google Site Search the query parameter will be the letter q, as shown in Figure 18-1. In case you’re curious about where that letter q originates, the URL in your browser’s address bar may look like this after you perform a site search (look for the “q” in the last line): http://www.yoursite.com/google-results.php?cx=000054 728233934906451%3A92y8tmfvku8&cof=FORID%3A11&ie=UTF- 8&q=analytics&sa=Search12345 Chapter 18n Site Search 343 t ip A common mistake in setting up Site Search is to include the = symbol after the query parameter. Inserting the = symbol will cause Site Search to not track any data. Simply insert the query parameter without the = symbol, and you should be good to go. 4. If your search function makes use of categories, then you insert up to v fi e comma-separated categories, which get their own individual reports in the Site Search section. Again, there are thousands of different possibili- ties here, but the URL in your address bar could look something like the following, if you’re using categories in your search function: http://www.yoursite.com/ search.php?q=nike+mens+running+shoes&shoes=mens+shoes 5. Once you hit Save Changes you will have access to the Site Search section of reports, found within the Content section. You won’t see any data yet, but don’t worry—wait a few hours and you may start to see some n o t e Remember, changes to one profile in your Google Analytics account will need to be duplicated in every other profile that you wish to track Site Search for. What If I’m Not Using Google Site Search? There are so many different available solutions for a web-site search function that we could devote about 10 full chapters of this book to them alone. So we’ll leave it up to your vendor of choice, and whether or not your software program enables you to install the Google Analytics Tracking Code on it. If the answer is “No,” then I’m very sorry to be the bearer of bad news— you won’t be able to track your web site’s search function activity in Google Analytics. You should consider upgrading to a solution that enables you to install JavaScript tags, if that’s feasible. However, if the answer is “Yes,” then the site search world is your oyster Here are two common situations that you’ll most likely run into with a non- Google site search solution: The first, and most common, situation is that there is no query parameter present in the URL at all. Unfortunately, this is the case with some non-Google site search solutions. If, after a search on your site, the URL in the address bar looks like this: http://www.yoursite.com/search.cfm?page=results 344 Part IVn The Reports then you will need to get with your webmaster to have the query parameter appear within the trackPageview function of the Google Analytics Tracking Code. This should be something that your webmaster can easily accomplish— assuming your site search solution is a flexible one. Figure 18-2 shows how the trackPageview function can be used within the Google Analytics Tracking Code to collect the search query. Notice the /?q= part inside the parentheses on line 145 of Figure 18-2—the letter q here is the search query letter that would be used in the Main Website Profile Information that we showed in Figure 18-1. Figure 18-2: Using trackPageview to collect the search query The second situation: If your site search solution resides on another domain— that is, on another web site—you’ll need to update the Google Analytics Tracking Code on both your site and the search vendor’s site for cross-domain tracking. Refer back to Chapter 14, where we show some examples of how to do this. What If I’m Not Using Any Search Tool? After you’ve finished reading this book, go to google.com and search for “site search.” Clicking on the first organic result will take you to Google’s Site Search web site, at which point you should pick up the phone or fire off an e-mail to your webmaster or IT director and ask—no, demand—that the Google Site Search engine be installed on your web site As mentioned at the beginning of this chapter, Site Search is a direct pipeline of communication between you and your web site’s visitors. It’s through a web site’s search function that your visitors can ascertain whether or not your site has what they are looking for, where they should go, and what they should do Chapter 18n Site Search 345 after obtaining this information. If you are an e-commerce retailer of any size it’s almost a requirement that you have a properly working, cutting-edge search function like Google Site Search installed on your site. Even if your web site is not an e-commerce store, you should still install a search function. As you’re about to find out, you may be very surprised to learn what your web site’s visi- tors are searching for while they are on your site Site Search Overview (Metrics) Enough already about setting up Site Search Now let’s get down to what’s important, which means obtaining insights from the reports With the Site Search section of reports, you’ll be introduced to some brand-new metrics exclu- sive to this section of Google Analytics. Figure 18-3 shows a part of the Site Search Overview report, which lists all the new metrics that you’ll begin to fall in love with. This report overview will list all these a fl shy new metrics for you, equipped with links to each individual metric’s histogram within the Trending report. Click on any metric to view a daily breakdown. Figure 18-3: Site Search Overview metrics Here are a few points about these metrics: 1. The percentage of visits that used Site Search is displayed right away in the gray bar. Depending on a number of factors this percentage can range anywhere from an infinitesimal amount to as high as 15 percent, and in some rare cases even higher than that. 2. Visits with Search shows the total number of visits (not visitors) for which your Site Search function was used. 346 Part IVn The Reports 3. Total Unique Searches displays the total number of unique searches performed. This is not to be confused with the total number of original searches performed, which can be obtained within the Search Terms report. 4. Now it starts to get interesting. The Results Pageviews/Search metric shows the average number of times a visitor viewed a search results page after performing a search. A high average number here can suggest that your search function isn’t displaying relevant results that match up with what users are searching for, which could be bad news for you. We’ll talk a bit more later on about what action(s) you should take, and where to take them. 5. The percentage of Search Exits is the percentage of visitors who leave your web site immediately after performing a search. In other words, it’s the bounce rate of your search function. This is an overall performance metric that you’ll need to keep an eye on. If this percentage is very high, ask yourself ,“What is my search function displaying to users after they perform a search?” Sometimes a very high percentage can indicate a tech- nical problem with your search function, such as an error page being displayed to your users (in which case you’ll want to sound the general alarm and get it fixed pronto). 6. Search Refinements occur when visitors perform additional searches (within the same session) after they’ve already performed a search. It’s tough to predict what a user’s intentions are in refining a search—per- haps the user searched for something that doesn’t exist on your web site? Maybe he or she misspelled the search term and is trying again? Or loved your search function enough to take it out for another spin? The old rule of thumb states that users should n fi d exactly what they’re looking for on their very first attempt, and shouldn’t have to refine a search. But that’s why it’s the “old” rule of thumb—maybe these refining visitors don’t exactly know what they are looking for in the first place, and need to search first before knowing what it is they really want. 7. Time after Search is another one of those metrics that you shouldn’t read too much into. Naturally you’d like for all your users to spend as much time as possible on your site, but if they only spend a minute or two after searching for something, it doesn’t necessarily mean that they were unhappy, or that they didn’t find what they were looking for. 8. Finally, Search Depth shows the average number of page views users make after interacting with your search function. Bear in mind that this metric is not the same as Results Pageviews/Search—that metric measures strictly the average number of results pages after a search, while Search Chapter 18n Site Search 347 Depth measures the average number of any page views performed after a search. For example, after performing a search, a visitor views three total web-site pages. One of those three pages is the second search-results page. Google Analytics will count this visitor’s search depth as 3 (pages), and this visitor’s Results Pageviews/Search as 2. It will then tally up all the Search Depth and Results Pageviews/Search counts for all visitors with Site Search to provide average numbers. Now that you’re familiar with these new metrics, let’s dive into the reports in this section and find out what all the fuss is about. Site Search Reports The Site Search Reports within the Content section in your Google Analytics profile feature six insightful reports (excluding the Overview Report): Usage, Search Terms, Start Pages, Destination Pages, Categories, and Trending. In this section, we’ll review each report and provide key insights for each. The Usage Report Figure 18-4 shows the Usage report, splitting your visitors into two groups: those who used Site Search and those who didn’t. While anyone can do the math and g fi ure out how many site users did not use the search function, don’t discard the potential that this report can bring to the table. Use the Goal Conversion and E-commerce tabs—along with the other metrics within the scorecard and the two drop-down menus within the report table—to determine different behav- ioral patterns between users and non-users. Do users of Site Search convert at a higher rate than non-users? Are the non-users spending more time on your site than the Site Search Users? Do folks who interact with your search function account for a higher revenue per transaction than folks who don’t? These are all valid questions that you can ask yourself here. Insights: If you see that very few visitors are using your site search function, consider implementing the search function on every page of your web site, including the homepage and any other high-volume pages. (Check your Top Content report to find out which pages are the high-volume ones.) If you already have the search function on all your site’s pages, consider drawing more atten- tion to it, or moving it to a more prominent place on your site, such as the top left-hand side of your pages. If you find that users are indeed using your search function, but they are simply not converting or making purchases like non-site search users, evaluate the search results that your search function is displaying to users, and see if there are any ways to optimize the search results. 348 Part IVn The Reports Figure 18-4: Site Usage report The Search Terms Report What makes the entire Site Search section awesome is the Search Terms report, which lists every search term that your site’s visitors entered into your search function. In this report you can also get the number of original searches, which is not available in the Site Search Overview report. Figure 18-5 shows an example of the Search Terms report. As you can see, you’ll be able to drill one level deeper and see metrics like %Search Exits, Time after Search, and Search Depth for each individual search term, thus getting a more precise overview of how users are using your search tool. You can also use the Goal Conversion and E-commerce tabs to see which search terms have directly led to outcomes for your web site, and as with any other report in Google Analytics, you can use the filter tools at the bottom to dig for specic fi search terms. n o t e Site Search terms are case-sensitive. Therefore, the search term “google” is not the same as the search term “Google” or the search term “GOOGLE.” These will be counted as three separate, unique search terms, and won’t be combined into one line item. Chapter 18n Site Search 349 Figure 18-5: The Search Terms report Insights: Are there search terms appearing in this list that have nothing to do with your web site, products, or services? It’s a great time to ensure that you are sending irrelevant searches to a creative “Sorry, no results” page that will let users re-enter the search process and refine their searches. On that note, are there search terms appearing here for products you don’t carry, or services you don’t offer? Now would be a fantastic time to consider adding these products or services to your business. Finally, is one search term suffering from a very high % Search Exit g fi ure? Do a test search on your own web site with this term to ensure that a technical issue isn’t throwing a monkey wrench into your program, or that your search function isn’t serving up an inordinate number of irrelevant search results. Nothing can frustrate a user more than an irrelevant search result. Just ask Google about that—it has the science of search pretty much down. P.S. Don’t worry about a search term like 9 in Figure 18-5. You’re guaran- teed to have some search queries like that popping up here and there. Simply ignore them. 350 Part IVn The Reports Start Pages and Destination Pages Reports Where did your users start their searches? What pages were they taken to after their searches? These two reports can answer those questions for you, and enable you both to perform analysis one level up from the Search Terms report and to view the start and end points of your visitor’s Site Search experience. Depending on the structure of your site, and where your search function is located, your web site’s pages can experience radically different results, even though you’re using the same search function everywhere. Figure 18-6: Destination Pages report Insights: For your Start Pages report, it’s imperative to identify the “ winners” and the “losers” among your highest starting Site Search volume pages. As with most reports in Google Analytics, you can ascertain the “what,” the “who,” and the “how many,” but the “why” part of the analysis equation is something you’ll need to take charge of. It needs to be your responsibility to step out of the site marketer/owner role and step into the everyday visitor role, by performing searches on your own site. There may be a technical issue or a search result relevance issue with some of your start pages that will need to be hashed out to improve start page performance. For your destination pages, it’s all about identifying the quality of your tool’s search results. Are folks going to irrelevant pages after performing a search? Are they going back and refining their searches? Or are they exiting the site Chapter 18n Site Search 351 immediately en masse after performing a search? Use this critical line of ques- tioning in your own head when looking at these kinds of reports in Google Analytics, and let regular, old-fashioned common sense guide you. The Categories Report If your site search function makes use of categories (and if you’ve cong fi ured your category names properly in your Main Website Profile Information, shown in Figure 18-1), then this report will break down the volume of searches per category for your convenience. Most search functions don’t use categories, so if you’re one of the lucky ones, take advantage of a report like this to identify which types of products are being searched for the most. For example, if your hats category is racking up most of the search volume, chances are that there may be enough interest in hats to run a special sale or promotion. You can also use the Categories report to evaluate your marketing efforts. Did you run a big direct mail campaign about your special on shoes this week? Or did you send an e-mail blast to your loyal subscribers about this month’s special on home and garden? If you’re not seeing much in terms of a boost in sales from those departments, AND if you’re not seeing much search volume in those categories, it can serve as a big sign to you that your next marketing efforts may need some tweaking. The Trending Report Rounding out the Site Search section of reports is the Trending report, which is a standard type of report that you’ll find for most main sections of Google Analytics. With the trending report, you’ll be able to get a monthly, weekly, daily, or hourly breakdown of all the searches performed on your site. By default you’ll see a daily breakdown, but simply modify your view in the trending graph to update the report accordingly. As Figure 18-7 shows, you can click on the Trending drop-down menu, underneath the total daily number of visits with search, to view the Trending report by any one of the site search metrics available in this section. This type of report is mainly for informational purposes—there aren’t too many actionable items that you can extract from this high-level type of report. So you shouldn’t read a lot into it when people perform searches on your site. Be happy that they’re using it in the first place 352 Part IVn The Reports Figure 18-7: Site Search Trending report The Philosophy of Site Search As I mentioned at the beginning of this chapter, site search is a direct line of communication between your web site and its visitors. It’s very important to keep that line of communication free of static (broken pages, irrelevant results, difc fi ult user experience, and so on). And, as also mentioned in this chapter, nothing is more frustrating to a user than a broken, irrelevant, or out-of-date search function. You may have the best site in the world, but if your site search frustrates, irritates, and confuses your users, all your efforts will be in vain. With things like Twitter and Facebook updates available to everyone, you also run the risk of frustrated users telling all their followers how much they hated searching for something on your site. Yes, you should take it that seriously. So, what can you do about all of this? Here are some tips that may help you make your Site Search function a good one: 1. Test, test, test That sounds like something a Google Website Optimizer engineer may say, but the only way to know how your site search is really working is to perform some test searches on it. Are the results relevant to your query? Are the listings updated? Do the listings even work when you click them? 2. Get smart about your “Sorry” page: We touched on this earlier in the chapter and it bears repeating here. On the Web, you’re bound to get your fair share of irrelevant searches that have nothing to do with your web site Chapter 18n Site Search 353 or your business. However, that doesn’t mean you should discard these searches and send them off to a cold, lifeless, unwelcoming “Sorry” page that looks like an error page, with one line of text across the top read- ing “Sorry, no results found.”.A great way to decrease the number of % Search Exits is to get creative with your “Sorry” page and try to get that user to refine his or her search. Work with your webmaster or IT person and come up with some creative content, links, and possibly a nice image to keep that visitor engaged with your web site. Did someone search for chrysanthemums on your red roses storefront? No problem— show searchers a nice image of a dozen bright red roses, and they may even go for it 3. Make your search results pages look like part of your web site: There’s no better way to scare the pants off your visitors than by sending them to a search results page that looks like someone else’s web site. Imagine the feeling you would get if you walked into JCPenney, went down the perfume aisle, and all of a sudden found yourself ordering a milkshake at Burger King This is what you want to avoid at all costs. Again, commis- sion your favorite web developer and work with that person to customize your search function so that it looks like a part of your web site. Work with your site search vendor to accomplish this if you use a search func- tion hosted on a separate domain. Send the vendor a template or a shell of your web site within which the vendor can place the search results. Make clear it’s of the utmost importance and has to be done. 4. Search Relevance: If you use Google Site Search, you probably don’t have to worry about this too much. If you use anything else, you will den fi itely want to stay on top of it, though. If you search for “light bulb” on your search function, the very first result that comes up should be something about “light bulb,” not about “tile o fl ors” or “carpeting.” (These examples sound ridiculous, but unfortunately they wouldn’t be out of place today). Once again, make your IT person or your site search vendor your best friend—then push your friend to update the search algorithm or optimize the search results for increased relevance. 5. Accept imperfection: Along with irrelevant searches, you can also expect your fair share of misspelled searches, searches with apostrophes, excla- mation points, and currency symbols, searches with non-ASCII charac- ters, and searches in all caps. Ideally your search function can accept searches like this without too much of a problem. Do what Google does and ask searchers if they meant something else when they made an honest mistake. 354 Part IVn The Reports Why Are People Searching on My Web Site in the First Place? If there were ever a 64 million question, this would be it. While it’s impossible to ascertain the exact reason someone searches on your site, downloads that PDF file, or watches your message from the CEO video, it’s very important to be aware of the way in which your search function is being used. Take a look at Figure 18-8. It shows the top 10 search queries performed on a web site (from the Search Terms report on Figure 18-5) against the top 10 organic search engine keywords used to find a web site (From the Trafc fi Sources Keywords report). Do you notice the big difference between these sets of search terms? The top site search terms are very broad, general, and short. Searches from Google, Yahoo, and Bing.com are more refined, specic fi , and longer-tail queries (longer-tail being search queries with multiple words, usually more than three words per search query). A lot of people aren’t aware that there is a difference between pre-site searches on search engines and on-site searches on your site’s search function. A lot of folks probably feel that these types of searches should be very similar, while others haven’t even thought about it until reading this paragraph. Thanks to Google Analytics, we can clearly see that visitor search behavior changes dras- tically when users are on a site as opposed to using a search engine. Pretty interesting, isn’t it? From our experience in analyzing hundreds of Site Search reports, and in speaking with hundreds of web-site visitors and colleagues directly, people generally don’t feel that they should need to phrase their queries as formally or have as precise an idea of what they’re searching for on a web site as on Google or Yahoo. They feel that the web site they are searching should know exactly what the visitor is typing into the web site’s search function, AND that the search function should be able to provide them relevant results that will make sense. They don’t feel like typing in three- or four-word queries. So what does this mean for you, the hard-working web-site owner with many other things to deal with day in and day out? It means that your search function must be running at optimal levels at all times. By testing your search function out every once in a while, and by analyzing the Site Search section of reports that we covered in this chapter, you’ll be able to determine if your search func- tion is doing its job in helping people find what they are looking for quickly and effectively. Is it fair to you that your search function must be able to read visitor intent, and bring up relevant search results to a user based upon single-word search queries like “hats” or “cameras”? No, it isn’t fair, but that’s the online world that we live in. The bottom line is this: if your search function isn’t up to par, your web site’s visitors will find another one on another web site, and you stand a great Chapter 18n Site Search 355 chance of losing those customers. Use the reports outlined in this chapter to help you achieve Site Search success, and you’ll be one happy web-site owner in no time Figure 18-8: Comparing the top 10 keywords and the top 10 search terms