[Bug] external-tracking.js interferes with some themes
-
Hello,
In this topic
https://www.ads-software.com/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 https://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
loopif(t==undefined || t=="")
- The topic ‘[Bug] external-tracking.js interferes with some themes’ is closed to new replies.