WordPress.org

Ready to get started?Download WordPress

Forums

Google Analyticator
[resolved] JavaScript error when Events Manager event is draft (2 posts)

  1. webaware
    Member
    Posted 1 year ago #

    G'day,

    Using Events Manager, with an event created by another user and saved as a draft, I get a JavaScript error -- analyticsFileTypes is not defined. This breaks other script on the page.

    It happens because is_preview() is true, so the GA script block isn't loaded, but external-tracking.min.js is still loaded and executes, generating the error.

    To fix, I wrapped the code within the ready handler function in a test:

    // only if GA script block has been loaded
    if (typeof analyticsFileTypes != "undefined") {
    ...
    }

    I'd appreciate it if you could add this to your next release.

    cheers,
    Ross

    http://wordpress.org/extend/plugins/google-analyticator/

  2. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks Ross,

    will release in 6.4.4 soon.

    Ben

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.