WordPress.org

Ready to get started?Download WordPress

Forums

Google Analyticator
[resolved] [Bug] external-tracking.js interferes with some themes (2 posts)

  1. Jesin A
    Member
    Posted 3 months ago #

    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/

  2. Video User Manuals
    Member
    Plugin Author

    Posted 3 months ago #

    Thanks so much for this. We included it in 6.4.7.2

Reply

You must log in to post.

About this Plugin

About this Topic