Title: include google api.js script only when needed
Last modified: October 16, 2017

---

# include google api.js script only when needed

 *  Resolved [paamayim](https://wordpress.org/support/users/paamayim/)
 * (@paamayim)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/include-google-api-js-script-only-when-needed/)
 * I notice I have the
 * `<script src="https://www.google.com/recaptcha/api.js?hl=it"></script>`
 * in the homepage even if there is no need for it in there, no forms whatsoever.
 * COuld you automatically do it register only when really needed or make a filter
   available to let user overide via theme or plugin function.
 * That’s because it slows down pagespeed especially on mobile devices.
 * (that’s what is saying google pagespeed here, but in italian, sorry)
 * [https://developers.google.com/speed/pagespeed/insights/](https://developers.google.com/speed/pagespeed/insights/)
 * ![](https://i0.wp.com/i.imgur.com/hdnPY9T.png?ssl=1)
 * Thank you
    -  This topic was modified 8 years, 5 months ago by [paamayim](https://wordpress.org/support/users/paamayim/).
    -  This topic was modified 8 years, 5 months ago by [paamayim](https://wordpress.org/support/users/paamayim/).
    -  This topic was modified 8 years, 5 months ago by [paamayim](https://wordpress.org/support/users/paamayim/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * (@bestwebsoft)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/include-google-api-js-script-only-when-needed/#post-9600935)
 * Hi!
 * To exclude script api.js from a specific page, please use the following code:
 *     ```
       if ( your_condition_for_page ) {
           remove_action( 'admin_footer', 'gglcptch_admin_footer' );
       }
       ```
   
 *  Plugin Author [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * (@bestwebsoft)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/include-google-api-js-script-only-when-needed/#post-9763019)
 * Hi,
 * Since there is no reply from you, we consider this topic as resolved. We hope
   you’ve found the solution. If you have any questions, please feel free to contact
   us via our Help Center – [https://support.bestwebsoft.com/](https://support.bestwebsoft.com/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘include google api.js script only when needed’ is closed to new replies.

 * ![](https://ps.w.org/google-captcha/assets/icon-256x256.gif?rev=2565249)
 * [reCaptcha by BestWebSoft](https://wordpress.org/plugins/google-captcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-captcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-captcha/)
 * [Active Topics](https://wordpress.org/support/plugin/google-captcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-captcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-captcha/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [bestwebsoft](https://wordpress.org/support/users/bestwebsoft/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/include-google-api-js-script-only-when-needed/#post-9763019)
 * Status: resolved