WordPress.org

Ready to get started?Download WordPress

Forums

Google Analyticator
[resolved] Patch donation: Unminified code included but not used with SCRIPT_DEBUG (2 posts)

  1. I was just doing some digging around in your code, and noticed that you had an un-minifed version of the JS, but that it wasn't used at all … even if the SCRIPT_DEBUG constant was defined as true.

    If you change the ga_external_tracking_js function as follows, then this will happen:

    /**
     * Adds the scripts required for outbound link tracking
     **/
    function ga_external_tracking_js()
    {
    	$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
    	wp_enqueue_script('ga-external-tracking', plugins_url("/google-analyticator/external-tracking{$suffix}.js"), array('jquery'), GOOGLE_ANALYTICATOR_VERSION);
    }

    Thanks for the plugin!

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

  2. Video User Manuals
    Member
    Plugin Author

    Posted 1 year ago #

    This has been added.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic