Title: pagenow variable undefined
Last modified: August 22, 2016

---

# pagenow variable undefined

 *  Resolved [codeforest](https://wordpress.org/support/users/codeforest/)
 * (@codeforest)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/pagenow-variable-undefined/)
 * Hi,
 * This is Zvonko, lead developer of OptimizePress.
 * We have a problem with your plugin as sometimes pagenow variable is not defined.
 * Could you be so kind and modify your code slightly to prevent this from happening
   and asure that we are compatible with each other? Below is what we did to prevent
   this.
 * FILE: plugins/optimizely/results.js
    LINE: 335 Everything together what has been
   modified:
 *     ```
       if (typeof pagenow != 'undefined'){
       if ( 'toplevel_page_optimizely-config' == pagenow && '' != optimizelySettings.token && '' != optimizelySettings.projectId ) {
       optimizelyResultsPage( optimizelySettings.token, optimizelySettings.projectId, optimizelySettings.visitorCount );
       } else {
       $( '#loading' ).hide();
       }
       }
       ```
   
 * Best regards
 * [https://wordpress.org/plugins/optimizely/](https://wordpress.org/plugins/optimizely/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [bradtaylorsf](https://wordpress.org/support/users/bradtaylorsf/)
 * (@bradtaylorsf)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/pagenow-variable-undefined/#post-5886736)
 * Thanks [@codeforest](https://wordpress.org/support/users/codeforest/) This has
   been added to version 3.5.2. If you see other issues in the future please feel
   free to submit pull requests to our pen source repo located here: [https://github.com/optimizely/wordpress-plugin](https://github.com/optimizely/wordpress-plugin)

Viewing 1 replies (of 1 total)

The topic ‘pagenow variable undefined’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/optimizely_004a69.svg)
 * [Optimizely Classic](https://wordpress.org/plugins/optimizely/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/optimizely/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/optimizely/)
 * [Active Topics](https://wordpress.org/support/plugin/optimizely/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/optimizely/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/optimizely/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [bradtaylorsf](https://wordpress.org/support/users/bradtaylorsf/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/pagenow-variable-undefined/#post-5886736)
 * Status: resolved