The Site Analytics app supports tracking SharePoint sites using separate Google Tag Manager containers.
The Overrides feature allows you to assign different GTM container IDs to specific SharePoint sites, enabling individual insights and engagement tracking for each site.
- First, you will need to complete all four steps from our configuration guide. Repeat the process for each Google Tag Manager container you need.
- Take note of all Google Tag Manager container IDs.
- Navigate to the Site Analytics configuration panel in SharePoint.
- Click on Advanced mode. In this panel, you can insert JSON to instruct the Site Analytics app which SharePoint sites will be connected to each Google Tag Manager container ID.
- Replacing the bold items in the JSON below will connect your SharePoint sites via the Site Analytics app to the relevant Google Tag Manager container IDs.
{
"version": 2,
"trackingId": "[Insert GTM container ID 1]",
"custom": false,
"overrides": [
{
"sites": ["/sites/sitename1", "/sites/sitename2"],
"trackingId": "[Insert GTM container ID 2]",
"custom": false
}
]
} -
Click on Save. The Site Analytics app will validate your configuration.