I've just switched to the new Google Analytics Universal Analytics platform, using the new javascript API - Analytics.js
In the first example code snippet from the docs a tracking object is created, then a pageview of the current page is logged using that tracking object.
ga('create', 'UA-XXXX-Y', 'auto');
ga('send', 'pageview');
Notice the 'auto'
argument - I can't work out what that's there for.
I had a look at the method reference and it seems that the relevant parameter is optional and should contain configuration key/value pairs. Examples can be found in the field reference. If the parameter is optional it seems odd to pass 'auto'
here unless it does something of significance, so you have to assume it does, but I can't find any mention of this.
Also, in the auto generated code in your account it does a similar thing but passes your domain
ga('create', 'UA-XXXX-Y', 'mydomain.com');
The fact your domain is specifically passed when they have it available again suggests it does something meaningful - otherwise they'd probably just use 'auto'
here too. But again, there's no mention of why this is done.
Am I missing something really obvious?