Title: Undefined variable
Last modified: August 22, 2016

---

# Undefined variable

 *  Resolved [a022278](https://wordpress.org/support/users/a022278/)
 * (@a022278)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/undefined-variable-13/)
 * I am getting a lot of PHP Notice’s from the tracking-code.php file.
 * It appears that the problem is with the $homeurl variable.
 * From v2.3.1 the variable was set as part of an if…else conditional. In v2.4, 
   the else statement has been removed so that if `get_option('set_domain')=='on'`
   resolves to false, the following lines call an unset $homeurl throwing an error.
 * Possibly related, it appears that in v2.4 this variable is not used at all. The`
   ga('create',...` statement no longer uses this variable as an argument.
 * This seems to be persistent in v2.4.1 and the trunk.
 * Thank you for taking the time to build, maintain and update this plugin.
 * [https://wordpress.org/plugins/google-universal-analytics/](https://wordpress.org/plugins/google-universal-analytics/)

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

 *  [qgonay](https://wordpress.org/support/users/qgonay/)
 * (@qgonay)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/undefined-variable-13/#post-5448636)
 * Hello, same problem here since update.
 *  Plugin Author [Audrius Dobilinskas](https://wordpress.org/support/users/audriusd-1/)
 * (@audriusd-1)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/undefined-variable-13/#post-5448672)
 * Hello!
 * I am not sure what is causing this for you. I don’t get such errors on any of
   my test websites. Here are my recommendations:
 * 1) Update your WordPress to the latest version 4.0.1
    2) Update Google Universal
   Analytics plugin (version 2.4.2 is now available)
 * 3) If these does not work, look at your other plugins. They may be causing the
   issue.

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

The topic ‘Undefined variable’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/google-universal-analytics_e1e9e2.
   svg)
 * [Google Universal Analytics](https://wordpress.org/plugins/google-universal-analytics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-universal-analytics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-universal-analytics/)
 * [Active Topics](https://wordpress.org/support/plugin/google-universal-analytics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-universal-analytics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-universal-analytics/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Audrius Dobilinskas](https://wordpress.org/support/users/audriusd-1/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/undefined-variable-13/#post-5448672)
 * Status: resolved