In ga ('create' 'ua-' 'auto'), what does "auto" mean?

In accordance with the document ` auto` in is ga('create' 'ua-' 'auto')described below.

opt_configObject - an optional object containing pairs of configuration parameters / values.

But I'm not sure, I fully understand this.

What is the difference between ga('create' 'ua-' 'auto')and say what I give ga('create' 'ua-' 'mysite.com')?

+4
source share
2 answers

I agree with the method signature, and many valid combinations can be confusing.

ga('create', 'UA-XXXXX-Y', 'auto');

coincides with

ga('create', 'UA-XXXXX-Y', {
  cookieDomain: 'auto'
});

"auto" cookieDomain : https://developers.google.com/analytics/devguides/collection/analyticsjs/domains#auto

, 'auto' 'mysite.com', "mysite.com", , "subdomain.mysite.com".

+5

, : ga ('create' 'ua-' 'mysite.com') cookie . , Google ? "", . YouTube. Google YouTube

+1

All Articles