I have just noticed that google analytic is providing analytic code with following parameter : ga('create', 'UA-XXXXXXXX-X', 'auto');But in some sites I have noticed like : ga('create', 'UA-XXXXXXXX-X', 'www.example.com');So is there any different effect between auto and actual web URL ?
Do I need to pass my website URL in Google Analytics?
google analytics
The third parameter in the create method sets the domain to which the GA cookie will be applied. If it is set to auto, then the cookie will be set at the highest domain name possible. Alternatively, you can set it explicitly by providing the domain name yourself.In your example with www.example.com, if you set the cookie parameter to auto (which just evaluates to window.location.hostname), then GA will set the cookie domain to example.com. But if you explicitly set it to www.example.com, then GA will set the cookie domain to www.example.com.You can read more about this here: https://developers.google.com/analytics/devguides/collection/analyticsjs/domains?hl=en#auto