Tuesday 1 August 2017

Sitecore Experience Analytics - A Deep Dive To Sub-sites Filter

If you ever checked Sitecore experience analytics reports you will definitely notice the all sites filter on the top right corner of the screen? do you ever though how this filter pull items? or how you can control the items "sub-sites" that appear in this filter? In this blog post I will share with you my experience with this filter.


So what are the values listed in this filter?

In this filter you can see the subsites that you have in you sitecore instance, by selecting the subsite from this filter you will be able to filter the analytics data based on it, which is usually a regular request by clients.



How these items filled to this filter?

If you open the related rendering for this filter, you can find on the following path:
..\Website\sitecore\shell\client\Applications\ExperienceAnalytics\Common\Layouts\Renderings\SubsiteFilter.cshtml

You will see the following code is pulling the subsites:


So, To answer this question I had to open "Sitecore.ExperienceAnalytics.dll" until I found the "Get Sites" method , which look like following:

From that code you can see that this filter will be populated from SQL table called "SiteNames" this table can be found in the reporting database.

So, How SiteNames table is being populated?

This table will be filled while the aggregation operation from the MongoDB, so if one of the sites has analytics data, then this value "site name" will be added to this table 

How I can prevent some of the subsites to be displayed in this filter?

All what you need to do is to go to the site definition configuration you have and add the following attribute to the sites that you want to stop collecting analytics data on:

enableTracking="false"

Is it safe to manually update the table by removing unwanted sites names?

Yes. You feel free to remove them from the [SiteNames] table of the Reporting DB.


Hope the above will help. :), also if you have any questions or additions please add a comment on this post.

3 comments:

Unknown said...

How can i add a non-sitecore site in filter?

Unknown said...

I want to track a non-sitecore site. I added a non-sitecore site in FXM and published it. But can not see my site in this filter. Please tell me how can i see my FXM non-sitecore site in filter.

sri said...

Thanks for sharing this.,
Leanpitch provides online training in Scrum Master during this lockdown period everyone can use it wisely.
Join Leanpitch 2 Days CSM Certification Workshop in different cities.

scrum master certification cost

Post a Comment