Support » Plugin: Analyticator » [Bug] external-tracking.js interferes with some themes

  • Resolved Jesin A

    (@jesin)


    Hello,

    In this topic

    http://wordpress.org/support/topic/problem-with-menu-at-smaller-sizes

    OP had a problem getting the mobile menu of the Neutro theme work.

    Firebug’s console displayed a error pointing to the external-tracking.min.js file whenever this menu was clicked.

    ReferenceError: analyticsSnippet is not defined
    http://www.normanlamont.com/wordpress/wp-content/plugins/google-analyticator/external-tracking.min.js?ver=6.4.7.1
    Line 1

    Reason:

    The problem is caused by how the external-tracking.js / external-tracking.min.js files handle an empty “href” attribute.

    Those files only had the following condition

    if(t==undefined)

    but the mobile menu of Neutro had a href attribute with nothing in it.

    <a id="mobile-secondary-menu-btn" class="btn btn-neutro" href=""><span>Menu</span></a>

    Solution:

    Add an additional check in the if loop

    if(t==undefined || t=="")

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

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Bug] external-tracking.js interferes with some themes’ is closed to new replies.