Excellent bug report!
First some easy stuff:
Make sure both “gaGlobal” and “Event Handler” fields are completely empty in settings.
If you’re comfortable using the browser console, could you run
console.log( window["GoogleAnalyticsObject"])
Hopefully it returns “ga”
And
console.log(typeof(jQuery.scrollDepth))
should return “function” if all is going well.
Ah…
I updated WordPress and plugins on our own site, and didn’t see any events!
Perhaps you’re having the same problem: we filter out our company IP addresses in Analytics. 🙂
Please let me know.
If you’re still having issues, could you post your URL?
Thread Starter
Anonymous User 11187416
(@anonymized-11187416)
Hi there, thanks for getting back to me!
- gaGlobal and Event Hander are (and were) empty
console.log( window["GoogleAnalyticsObject"])
give “Undefined” error (which is odd as Google Analytics itself is working fine.
console.log(typeof(jQuery.scrollDepth))
also gives “VM272:1 Uncaught ReferenceError: jQuery is not defined(…)”
- The site had nearly 300 visits yesterday so even if I were filtering out our IP address (which we are not) there should still be data to play with
URL is a personal health and gaming blog fibrojedi.me.uk.
I thought maybe it was because I had jQuery in the footer, but I’ve kept it in the header using an exclusion (I’m using the plugin ‘Scrips to Footer’ to help with page speed)
Final Edit: it looks like your script is attempting to trigger prior to to the script tag pulling in jQuery which may be the issue. As this is done via wp_head I don’t know an easy way of re-arranging this…unless you declaration can go just before the </body> tag?
Thanks!
Following up on this.
Looks like it’s working now?
Did an update fix it, or did you change a setting?
I always want to add to the documentation to help new users.
Thanks.