412.343.3692
1.800.975.1844

Google Analytics Site Search with Custom Search Engine

“Why isn’t my Custom Search Engine working with Site Search?”

Since I had never used Google’s Custom Search Engine before (shame on me), my answer was:

“Gee, I don’t know, let’s look at the instructions.”

But the instructions were nowhere to be found. The truth is, it’s so easy, you just might miss it.

So I took a look. Site Search was turned on. Check. The Custom Search Engine script was on the page. Check. Results are being displayed. Check.

So what was the problem?
Custom Search Engine
I didn’t notice it at first. The results were being hosted on Google.

In order for site search data to be processed by Google Analytics, you need to bring them back to your site. So in your CSE control panel, under Code, make sure you selelct the iframe option and follow the instructions provided (which, as usual, just involves copying and pasting a little bit of JavaScript.)

Now, at this point you might ask “What the heck is an iframe and how do I do it?”

It is just the term that describes the technique used by Google to get their search results inside your page. Don’t be afraid. There isn’t any additional iframe-related implementation that you have to do.

Oh, and make sure that the new page you create for the results is also tagged with your GATC (Google Analytics Tracking Code.)

That’s it. See, I told you it was easy.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • StumbleUpon
  • Sphinn
  • Facebook

8 Responses to “Google Analytics Site Search with Custom Search Engine”

  1. David Cox Says:

    Why is it that Google does not put this in the help information. Thank good ness I found this I have been trying to make this great feature work and it just would not. I can not wait to see the report tomorrow since this will greatly help me refine the site based on user input. Thanks for the post and i am glad to have found it.

  2. Diana Brewster Says:

    THANK YOU! I’ve been struggling for days to figure out why Google Analytics wasn’t showing our custom search engine results!

    You’re an angel. Now, tell me why this information isn’t on Google’s extensive help pages.

  3. Robert Weide Says:

    I agree with the comments above. The analytics help makes it seem just a little too simple. THis really should be in there, thanks for writing it down!

  4. Karsten Says:

    How can I use the overlay and still get the search terms?

  5. John Says:
    Karsten,

    I’m not sure what you mean by using the over and still getting the search terms. If you can give an example, or try to explain it differently, maybe I’ll get what you’re asking.

    Sorry,

    John

  6. Find Torrent Search Engine Says:

    I still don’t get this.
    I have a search engine that is on my site. It searches different site (excluding my own site). I want to be able to see what my users are searching for.

  7. Find Torrent Search Engine Says:

    Also, does your search engine and your analytics need to be under the same google account?

  8. John Says:
    The search engine and analytics do not need to be under the same account. As along as you select display the results in an iframe, it should not matter that it searches a different site. Make sure you have the Google Analytics Tracking Code on the results page, however.

Leave a Reply