Events not being tracked in new Google Analytics (analytics.js) setup

If you are using Google Tag Manager and also want to trigger some events via code, ga(‘send’…) does not appear to be enough. You need to first fetch the appropriate analytics object: if (“ga” in window) { tracker = ga.getAll()[0]; if (tracker) tracker.send(“event”, “Test”, “Test GA”); } Note that this assumes you’re only using a … Read more