1

This may seem like a really obvious question, but I just wanted to make sure as I couldn't find any documentation on this particular attribute.

Within the site definitions <site> there is an attribute called enableTracking:

For example:

<site name="service" enableTracking="true" virtualFolder="/sitecore/service" physicalFolder="/sitecore/service" />

I am wondering if this attribute is defaulted to true if it is not present?

Does it determine if an individual site has XDB tracking enabled / disabled? Or does it have another purpose?

0

It looks like the default setting for a site is true if not set. This will of course be overridden by the global setting.

namespace Sitecore.Analytics.Tracking
{
    public class TrackingSiteContext
    {
        public TrackingSiteContext (SiteInfo siteInfo)
        {
            this.SiteInfo = siteInfo;
        }

        public bool EnableTracking
        {
            get
            {
                bool flag = true;
                bool result;
                if (bool.TryParse (this.SiteInfo.Properties["enableTracking"], out result))
                    flag = result;
                return flag;
            }
        }

        protected SiteInfo SiteInfo { get; set; }
    }
}
| improve this answer | |
2

I asked the following question to Sitecore support and the answer was:

This setting literally defines whether analytics tracking is enabled for a site or not.

For some sites tracking can be excessive functionality, therefore this parameter allows disabling it in a handy way on a site level.

You can enable it globally but disable for specific sites by this setting.

| improve this answer | |
  • But what is the default? Assuming true now, but is that a correct assumption? – Gatogordo Sep 12 '18 at 8:02
  • @Gatogordo I think the default would be the global setting if the enableTracking is not set. It will fallback to the global one. – Hishaam Namooya Sep 12 '18 at 8:44
  • Correct, based on the answer I believe it is true by default. – TomT Sep 12 '18 at 10:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.