Google Analytics by MonsterInsights
JQuery undefined when tracking comments and loading in the footer (1 post)

  1. IanRr
    Posted 3 years ago #

    This comment tracking code outputs a few lines above where my theme is calling, in the footer, a CDN-hosted script with the handle 'jquery' (we are unregistering the WP's stock 'jquery' script)...

    <script type="text/javascript">
    jQuery(document).ready(function () {
    	jQuery('#commentform').submit(function () {
    			['_setAccount', 'UA-*******-2'],
    			['_trackEvent', 'comment', 'submit']

    We don't know what "jQuery" is yet, so:

    Uncaught ReferenceError: jQuery is not defined

    Is anyone else having this issue, or is there something silly I'm doing wrong? I think I can workaround it if I really need to (I don't) but it seems like a bug.

    I will also accept convincing arguments that jQuery should be in the header: must be convincing enough for my boss :)


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google Analytics by MonsterInsights
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic