Title: PHP Fatal error: Call to undefined function get_plugin_data()
Last modified: August 20, 2016

---

# PHP Fatal error: Call to undefined function get_plugin_data()

 *  Resolved [aljuk](https://wordpress.org/support/users/aljuk/)
 * (@aljuk)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-call-to-undefined-function-get_plugin_data/)
 * I use this plugin on several sites, and they are now all giving this error:
 * PHP Fatal error: Call to undefined function get_plugin_data() in /wp-content/
   plugins/google-analytics-for-wordpress/inc/class-tracking.php on line 88
 * [http://wordpress.org/extend/plugins/google-analytics-for-wordpress/](http://wordpress.org/extend/plugins/google-analytics-for-wordpress/)

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

 *  [billsmithem](https://wordpress.org/support/users/billsmithem/)
 * (@billsmithem)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-call-to-undefined-function-get_plugin_data/#post-3579159)
 * I’ve started getting the same error on multiple sites as well.
 *  Thread Starter [aljuk](https://wordpress.org/support/users/aljuk/)
 * (@aljuk)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-call-to-undefined-function-get_plugin_data/#post-3579188)
 * These errors are being generated in their hundreds and slowing my sites right
   down…
 *  [Stufo76](https://wordpress.org/support/users/stufo76/)
 * (@stufo76)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-call-to-undefined-function-get_plugin_data/#post-3579191)
 * Me too…
 *  [stevef007](https://wordpress.org/support/users/stevef007/)
 * (@stevef007)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-call-to-undefined-function-get_plugin_data/#post-3579192)
 * Same here…
 *  [Yunus](https://wordpress.org/support/users/amyunus/)
 * (@amyunus)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/php-fatal-error-call-to-undefined-function-get_plugin_data/#post-3579214)
 * Oh so, not only me that having this issue, and this issue raised more than a 
   week ago. hm.
 *  Moderator [Sergey Biryukov](https://wordpress.org/support/users/sergeybiryukov/)
 * (@sergeybiryukov)
 * WordPress Dev
 * [13 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-call-to-undefined-function-get_plugin_data/#post-3579223)
 * `get_plugin_data()` is only available in the admin:
    [http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/includes/plugin.php#L38](http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/includes/plugin.php#L38)
 * The plugin calls it in `Yoast_Tracking::tracking()` function:
    [http://plugins.trac.wordpress.org/browser/google-analytics-for-wordpress/tags/4.3.2/inc/class-tracking.php#L86](http://plugins.trac.wordpress.org/browser/google-analytics-for-wordpress/tags/4.3.2/inc/class-tracking.php#L86)
 * The function is scheduled to run daily. When it runs on front-end, it causes 
   the fatal error.
 * The workaround is to disable “Allow tracking of anonymous data” option in the
   plugin settings.
 *  Thread Starter [aljuk](https://wordpress.org/support/users/aljuk/)
 * (@aljuk)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-call-to-undefined-function-get_plugin_data/#post-3579224)
 * Thanks for the info Sergey!
 *  [Joost de Valk](https://wordpress.org/support/users/joostdevalk/)
 * (@joostdevalk)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/php-fatal-error-call-to-undefined-function-get_plugin_data/#post-3579225)
 * Thanks for that Sergey, will fix this now.
 *  [Alex](https://wordpress.org/support/users/asterix/)
 * (@asterix)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/php-fatal-error-call-to-undefined-function-get_plugin_data/#post-3579269)
 * So just to confirm, the “Allow tracking of anonymous data” setting can be enabled
   without any performance loss (slower page loading)? We like to contribute to 
   your plugin by providing this data for you, but not at the cost of performance.
 * We have noticed that despite async the [http://www.google-analytics.com/ga.js](http://www.google-analytics.com/ga.js)
   file takes up a lot of time in our page load waterfall. Is there a way around
   this?

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

The topic ‘PHP Fatal error: Call to undefined function get_plugin_data()’ is closed
to new replies.

 * ![](https://ps.w.org/google-analytics-for-wordpress/assets/icon.svg?rev=2976619)
 * [MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)](https://wordpress.org/plugins/google-analytics-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analytics-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analytics-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analytics-for-wordpress/reviews/)

 * 9 replies
 * 8 participants
 * Last reply from: [Alex](https://wordpress.org/support/users/asterix/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/php-fatal-error-call-to-undefined-function-get_plugin_data/#post-3579269)
 * Status: resolved