I’m trying to use Google Analytics autotrack script and am following the instructions as per their site but when I try and compile it states ga is undefined in the linter error (3:1 error 'ga' is not defined no-undef
).
// /resources/assets/scripts/autoload/Autotrack.js
import 'autotrack';
ga('create', 'UA-XXXX-1', 'auto');
I assume ga is defined in the autotrack file I’m importing but I’m guessing the linter doesn’t know this. Is there a way around this or a way of telling the linter what ga is?