Title: [Plugin: Google Analytics for WordPress] Error when creating new sites
Last modified: August 20, 2016

---

# [Plugin: Google Analytics for WordPress] Error when creating new sites

 *  [manakuke](https://wordpress.org/support/users/manakuke/)
 * (@manakuke)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-error-when-creating-new-sites/)
 * I’ve been using this plugin for a while now with no problems until this past 
   week. Anytime I add a new site (I have WP set to multisite), the new site crashes
   with one of the two errors below unless I disable the plugin. All old sites previously
   configured work just fine.
 * Error messages:
 * > Fatal error: Call to a member function set_defaults() on a non-object in /var/
   > www/wp-content/plugins/google-analytics-for-wordpress/googleanalytics.php on
   > line 1452
 * > Fatal error: Call to undefined function wp_get_current_user() in /var/www/wp-
   > content/plugins/google-analytics-for-wordpress/googleanalytics.php on line 
   > 1348
 * [http://wordpress.org/extend/plugins/google-analytics-for-wordpress/](http://wordpress.org/extend/plugins/google-analytics-for-wordpress/)

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

 *  [turkeyphant](https://wordpress.org/support/users/turkeyphant/)
 * (@turkeyphant)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-error-when-creating-new-sites/#post-2313454)
 * Did you ever fix this? I am trying to add a new site/domain and every time I 
   do it I get this error. Any ideas?
 *  Thread Starter [manakuke](https://wordpress.org/support/users/manakuke/)
 * (@manakuke)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-error-when-creating-new-sites/#post-2313455)
 * Nope 🙁
 * I ended up using a different plugin. Pain in the behind. After switching plugins,
   had to go through each site and reattach my API credentials, but everything is
   working fine again.
 * Google Analyticator: [http://wordpress.org/extend/plugins/google-analyticator/](http://wordpress.org/extend/plugins/google-analyticator/)

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

The topic ‘[Plugin: Google Analytics for WordPress] Error when creating new sites’
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/)

 * 2 replies
 * 2 participants
 * Last reply from: [manakuke](https://wordpress.org/support/users/manakuke/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-error-when-creating-new-sites/#post-2313455)
 * Status: not resolved