Search code examples
google-custom-search

How to monitor usage of Google Custom Search Engine


I'm migrating from Google's Google Site Search (GSS) to Google Custom Search Engine (CSE). I'm using the Atom/JSON API via a PHP library, exactly as I was for my current GSS service. I've created a new CSE search engine in my account and updated the secret key and search engine ID in my PHP configuration.

But I'm not sure how I can monitor the usage of my new CSE search engine? How can I tell whether I've run out of requests? How will I know when I need to pay? In fact, how do I even know that my search requests are going to my new CSE and not to my old GSS?

Is there any sort of logging of searches made using my CSE that I can check?

As a side question, I don't understand how CSE is ad-supported. The Atom/JSON API doesn't seem to include any ads in the results. And even if it did, how can Google force me to display them?


Solution

  • You can get basic usage stats on the Statistics tab (https://cse.google.ca/cse/statistics/stats?cx=) or much more detailed statistics by creating a free Google Analytics account here and then associating it with your CSE by adding your Analytics ID at (https://cse.google.ca/cse/statistics/ga?cx=). The Analytics mobile app (Android or iOS)is pretty slick and can be customized countless ways.