Support » Plugins and Hacks » [Resolved] Unable to activate PageSpeed Service

[Resolved] Unable to activate PageSpeed Service

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author mattkeys


    I am unsure if this is the support form you are looking for. Pagespeed Service is a separate product from Google than what is being used here in the WordPress Pagespeed Insights plugin.

    Information about google’s support forums for those products can be found here:


    Plugin Author mattkeys


    A new version of this plugin was released today that addressed some issues others were having with activating this plugin. If you were indeed using my plugin and having issues, please try the new version.

    Hi Matt,
    I am using Version 1.03.
    The plugin reports that “The “PageSpeed Insights API” service is not enabled. To enable it, please visit the “Services” page from your Google API Console.” Please see this screenshot:
    However, here is a screenshot showing that it is active:
    Can you please help resolve this issue?

    Plugin Author mattkeys


    I have not run into this issue before. Is it possible that you have entered the wrong API key (server key instead of browser key)? Or an API key from another account entirely?

    The error you are seeing is displayed when the response from the google API contains that error code.

    If you have double checked your API key and continue to experience the same issue you may need to contact the Pagespeed team. I have found them to be very responsive to posts here: Pagespeed Insights Google Group

    Let me know how it goes.

    Here is a side-by-side comparison: http://note.io/1hR5HJl
    The tool stops around 60% each time: http://note.io/1cySrdg
    I posted this on the Group, but no one has responded: https://groups.google.com/forum/#!topic/pagespeed-insights-discuss/1PfBdwms87Y
    Is there a log where I can see the errors being generated?

    Plugin Author mattkeys


    In the options under “Advanced Configuration” there is an option for “Log API Errors” that you can turn on. However it is designed to only log “uncaught” errors that are not expected by the plugin, so it may not log anything if the only errors you are getting are being caught already.

    The log file itself will be put in a log directory within the plugin dir.

    If you want to log the full response from the Google API and you are comfortable making some edits, you can add some additional logging.

    In /core/core.php on line #163 you will see $result = $service->pagespeed … etc. If you place the following code directly below that line, it will log the response from google for each page being checked.

    file_put_contents(GPI_DIRECTORY . '/logs/google_response.txt', print_r($result, true), FILE_APPEND);

    Note: This will only log desktop reports, mobile reports are generated shortly after starting around line #201. And don’t forget to remove this when you are done as the log file can get quite large.

    Plugin Author mattkeys


    Also possibly of use: the error code from Google’s API that my plugin interprets as Pagespeed Insights being disabled is “accessNotConfigured”.

    I will be interested to see the results of your logging, perhaps this error code is triggered for more than just that symptom? If you are able to capture a full response with the error feel free to post it here using something like http://pastebin.com/

    Hi, I’m getting the same problem after installation as referred to above: the plugin reports that “The “PageSpeed Insights API” service is not enabled. I’ll look more into it and get back to you. In the meantime I’ll keep an eye on this thread for any further developments.

    I see this thread is marked ‘resolved’ – could you unmark it please as it is still an ongoing problem for me.

    I’ve added my details to the post by Josh Fialkoff on the Google product forum, but he hasn’t had any replies. I also noted this issue that might help you narrow down the problem:

    on the front page of the Developer’s Console the chart showing API requests does show activity for whenever I have requested a check: it seems that the checks are being made when I request them in the plugin, it’s just that the reports aren’t being generated – does that make the likely problem any clearer?

    I’ll install the plugin on another WordPress site I have to see if the same problem occurs.

    Plugin Author mattkeys


    Hey Don, thanks for adding your experiences here to help resolve this issue.

    This thread is marked resolved because the original poster was asking about the “Pagespeed Service”, which is actually a different Google product than Pagespeed Insights and doesn’t have anything to do with this plugin. After not hearing back from that poster I marked the thread resolved. Feel free to make a new thread in this form if you would like.

    As for your clue, it does tell us that the plugin is talking to Google’s API which is good, but that data alone doesn’t provide us any clues as to why the plugin is not working for you two, but does work for others.

    A couple of posts up I made some recommendations to Josh on how he could log the API responses from Google to try to help resolve this issue but I have not heard back. If you are able to log the responses it would be very helpful. You can post them here using a service such as pastebin.com



    Thanks for your patience, Matt. I’ll create another thread.

    Plugin Author mattkeys



    Donald was experiencing the same issue as you, and it ended up being an issue with the configuration in Google Console. When creating a new project Google allows you to enter ‘allowed referrers’. The screen looks like this: http://mattkeys.me/documentation/google-pagespeed-insights/assets/images/api_key_10.png

    I usually leave this blank which allows any referrer. However if you entered something here and it is not matching up to the site you are trying to use the plugin on, this would cause your issue.

    Full instructions on this process can be found here: http://mattkeys.me/documentation/google-pagespeed-insights/#required_configuration

    Thanks Matt!
    You’re absolutely right. One of my developers solved the problem as well. I was going to post the update when I return from vacation. Glad to see Donald fixed it and that it had nothing to do with your plugin.
    Thanks again!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Resolved] Unable to activate PageSpeed Service’ is closed to new replies.