The guide here uses this package: Lazy Analytics
This package can initiate GA for development enironments.
Usually when initializing GA, the ga()
command queue is called like so ga('create', 'UA-XXXXX-Y', 'auto');
If the pacakge is initialized with google-test-code
, the command queue is instead run like so ga('create', {env: 'dev', google: 'google-test-code'}, 'auto')
It is helpful to install the Google analytics debugger With this extension, you don't actually have to have a GA account and the associated UA key set up for your site. The extension will track and log into the console all the tracking beacons being sent from your SPA.