Home > Data Collection
Export to PDFYou can configure tyGraph to collect data for specific SharePoint sites or restrict it to only certain sites. If you opt to restrict tyGraph to collect specific sites only, you may opt to create a custom app registration with the Microsoft Graph sites.selected permission to reduce the permissions available to tyGraph.
To configure the data collection settings, click Data collection on the left navigation pane, and then refer to the following instructions:
Select a tenant to configure the data collection for.
Click Edit to open the Edit data collection panel.
In step 1, Select collection method, choose one of the following collection methods to collect data from SharePoint:
Allow data collection on all sites – Allow data collection for SharePoint and Pages across all sites in the tenant. Once you select this method, all sites will be included for data collection automatically, and you do not need to manually add specific site URLs for inclusion or exclusion.
Allow data collection on specific sites – Allow data collection for SharePoint and Pages to specific sites. After selecting this method, you need to specify the site URLs you wish to include for data collection in step 2 Add sites.
Exclude a set of sites from data collection – Restrict data collection for SharePoint and Pages to specific sites. After selecting this method, you need to specify the site URLs you wish to exclude for data collection in step 2 Add sites.
Click Save to save your configurations for data collection.
To use Microsoft Graph sites.selected permission, create a custom app registration with the same permissions as the tyGraph Suite permissions or tyGraph for SharePoint permissions based on which SKU you have purchased. Replace the Microsoft Graph Sites.FullControl.All or Sites.Read.All permission with the sites.selected permission. You will need to add the list of sites to your app registration using PowerShell or other script. You must ensure that the list of sites selected in your app registration matches the list of sites that you have listed in the Data collection pane above. If the list of sites does not match, you may encounter harvesting failures.
*Note: Some reports such as “Sites that I own” will not function if you use the Microsoft.Graph sites.selected permission. For the best reporting experience, we recommend that you do not use the sites.selected permission unless your organization’s policies require it.
The tyGraph Pages engine automatically collects relevant data about the pages, sites, and user in your SharePoint environment. When a developer has customized or built an application on top of SharePoint, he or she may want to collect additional custom data. You can send this information on any modern SharePoint page using the window.tyGraphCustom object. This object is available on any SharePoint modern page assuming you have installed the tyGraph Pages engine.
You can utilize the following functions on the window.tyGraphCustom object:
The properties object can accept most simple JavaScript objects with key / value pairs. The tyGraph Pages engine will automatically track the same properties it usually does such as page, site, and user information so you don't need to collect those yourself.
Simple example of using the trackEventmethod:
window.tyGraphCustom.trackEvent('myCustomEvent', { field1: 'stringValue', field2: 0 });
We have built the reporting in tyGraph Pages around a pre-determined set of data values. As a result, these reports won't contain your custom data. If you need to report on your custom data, you can view it in Application Insights or build a Power BI report yourself.