Title: Undefined variable: nkweb_code_in_head
Last modified: August 30, 2016

---

# Undefined variable: nkweb_code_in_head

 *  Resolved [aamir2007](https://wordpress.org/support/users/aamir2007/)
 * (@aamir2007)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/undefined-variable-nkweb_code_in_head/)
 * After updating to latest version today, I am getting following php warning via
   query monitor plugin.
 * Undefined variable: nkweb_code_in_head
 * [https://wordpress.org/plugins/nk-google-analytics/](https://wordpress.org/plugins/nk-google-analytics/)

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

 *  [cameronreilly](https://wordpress.org/support/users/cameronreilly/)
 * (@cameronreilly)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/undefined-variable-nkweb_code_in_head/#post-6262045)
 * +1.
 *  [Winbladh](https://wordpress.org/support/users/winbladh/)
 * (@winbladh)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/undefined-variable-nkweb_code_in_head/#post-6262088)
 * Still a problem!
 *  [brokenspoke](https://wordpress.org/support/users/brokenspoke/)
 * (@brokenspoke)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-nkweb_code_in_head/#post-6262106)
 * I have a similar issue. Whenever we add or edit a post the following always shows
   up at the bottom of the post:
 *  nkweb_code_in_head: default
    nkweb_Use_Custom_js: default nkweb_Custom_js: nkweb_Use_Custom_Values:
   default nkweb_Custom_Values: nkweb_Use_Custom: false nkweb_Custom_Code:
 * We have to go back into the post and delete the custom fields and NOT save the
   post. If we press Update the fields just come back.
 *  Thread Starter [aamir2007](https://wordpress.org/support/users/aamir2007/)
 * (@aamir2007)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-nkweb_code_in_head/#post-6262107)
 * I was able to resolve my issue by replacing line 103 on NKgoogleanalytics.php
   file with following.
 * `if (isset($nkweb_code_in_head) && $nkweb_code_in_head == “true” ) {
 *  Plugin Author [justanotherdev](https://wordpress.org/support/users/marodok/)
 * (@marodok)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-nkweb_code_in_head/#post-6262130)
 * Thank you aamir2007,
 * I added this code line to the plugin,
 * Regards

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

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

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

 * 5 replies
 * 5 participants
 * Last reply from: [justanotherdev](https://wordpress.org/support/users/marodok/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/undefined-variable-nkweb_code_in_head/#post-6262130)
 * Status: resolved