Google Analyticator
Throws exception in WP 3.1 (2 posts)

  1. dthorpe
    Posted 4 years ago #

    After upgrading to WP 3.1 I noticed the OpenID Selector plugin wasn't displaying the large and small icons of OpenID providers in the user login screen. After a little investigation, I discovered that this behavior only occurs if the Google Analyticator (6.1.1) is active and outbound link tracking is enabled.

    Looking at the Firefox error console, I find an error message "analyticsFileTypes is not defined".

    When outbound link tracking is disabled in Google Analyticator, this error does not occur and the OpenID Selector works normally.

  2. Sith Lord Goz
    Posted 4 years ago #

    I'm seeing the same error as dthorpe. I think it's because the variable analyticsFileTypes is var'd in the core Analytics snippet but subsequently called in the externaltracking.js.

    This means if the core code isn't being included (as on the login screen) the externaltracking.js IS included without the parent code - so it throws the 'not defined' error.

    My workaround was to add a function called via add_action('login_head') to add a .js file (just for the login page) that simply includes this line:

    var analyticsFileTypes = "";

    This is inline so should fire before the jquery onload()

    Seems to work ok... would appreciate feedback. Plugin author could also just test for tracking before writing the externaltracking.js file :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic