WordPress.org

Forums

Google Analytics by Yoast
[resolved] PHP Fatal error: Call to undefined function get_plugin_data() (10 posts)

  1. aljuk
    Member
    Posted 2 years ago #

    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/

  2. billsmithem
    Member
    Posted 2 years ago #

    I've started getting the same error on multiple sites as well.

  3. aljuk
    Member
    Posted 2 years ago #

    These errors are being generated in their hundreds and slowing my sites right down...

  4. Stufo76
    Member
    Posted 2 years ago #

    Me too...

  5. stevef007
    Member
    Posted 2 years ago #

    Same here...

  6. AMYunus
    Member
    Posted 2 years ago #

    Oh so, not only me that having this issue, and this issue raised more than a week ago. hm.

  7. Sergey Biryukov
    WordPress Dev
    Posted 2 years ago #

    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

    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

    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.

  8. aljuk
    Member
    Posted 2 years ago #

    Thanks for the info Sergey!

  9. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for that Sergey, will fix this now.

  10. Alex Schenker
    Member
    Posted 2 years ago #

    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 file takes up a lot of time in our page load waterfall. Is there a way around this?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics by Yoast
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.