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('create', 'UA-XXXX-Y', 'mydomain.com');
Actually when I look in to code it does not pass the name of my property but the standard domain set in the configuration - which makes a lot more sense, since the parameter sets the cookie domain (in case of
the value of to the hostname without subdomains). Alternatively you can pass a configuration object as third parameter (which might contain a cookie domain setting). Try and set a wrong parameter - you'll get a "no storage" error in the analytics debugger since the code cannot set a cookie.