How to track SharePoint page properties (Site Analytics)
The Site Analytics app supports tracking page properties from SharePoint.
Site Analytics can capture properties from a SharePoint page - such as default and custom metadata columns on the Site Pages library - and send them as part of an event to Google Analytics. This allows you to report on page-level metadata directly within your Google Analytics reports.
Throughout this guide, we'll use a single example: tracking the Created column on the Site Pages library.
Step 1: Find your column's internal name
Every SharePoint column has an internal name, which the system uses to reference it, and this can differ from its display name (the label shown to editors). You'll need the internal name to configure Google Tag Manager, Google Analytics, and SharePoint consistently, so it's worth finding this first.
Tip: To find a column's internal name, navigate to the Site Pages library > Settings > Library settings. Click on the column, and check the end of the URL in your browser - the value after &Field= is the internal name.
Here are some common default SharePoint column internal names that you may wish to track:
| Column | Internal name |
|---|---|
| Created | Created |
| Created By | Author |
| Modified | Modified |
| Modified By | Editor |
| Audience | _ModernAudienceTargetUserField |
These default SharePoint columns are already available in every Site Pages library, so no setup is required to start tracking them:
Step 2: Google Tag Manager configuration
To track a page property, you first need to make it available to Google Tag Manager. This means creating a variable that reads the value from the page, then adding it to the event you'd like the property to be tracked against.
- Navigate to your Google Tag Manager workspace, click Variables, then under User-Defined Variables click New.
- Choose a Variable Type - select Data Layer Variable under the Page Variables section.
- In the Data Layer Variable Name field, enter the column's internal name in lowercase, prefixed with
sp_. For our example, this would be sp_created. - Use the same name to title the variable at the top of the panel.
- All other fields can remain unchanged. Click Save.

- Next, add the new data layer variable to each event parameter where you want it tracked - for example, page view, scroll, or click events. You can find this in the Variables section. Open the relevant event parameters variable - for a page view, this is A365 Page View event parameters.
- Click into the variable configuration to edit it, then click Add parameter, and select your newly created data layer variable.
- For our example, we'll set the Event parameter name to sp_created.
- In the Value column, select your data layer variable using the + icon - this should appear formatted in double curly brackets, e.g.
. - Click Save, then publish your container using the Submit button.

Step 3: Google Analytics configuration
Next, create a matching custom dimension in Google Analytics so the new parameter can be filtered and reported on.
- Navigate to your Google Analytics property and click Admin (bottom left).
- Under Data display, click Custom definitions.
- Click Create custom dimension.
- Enter the dimension details for your page property:

- Click Save.
Step 4: SharePoint configuration
Finally, configure the Site Analytics web part to collect and send the page property.
- If you haven't already connected your GTM container ID, follow the steps in our Connecting Google Tag Manager to SharePoint guide.
- Navigate to the Site Analytics configuration panel in SharePoint.
- Click Advanced mode.
- Add a
sitePagesPropertiessection to your JSON, listing the internal name of each field you want to track.
Following our example, the JSON below instructs Site Analytics to retrieve the Created column from the Site Pages library:{
"version": 2,
"trackingId": "[Insert GTM container ID]",
"custom": false,
"sitePagesProperties": [
{
"field": "Created"
}
]
} - Before clicking Save, ensure that custom scripts are enabled on your SharePoint site. Without this, your configuration will not be saved. Learn how to enable custom scripts.
- Click on Save. The Site Analytics app will validate your configuration.
Note: Most fields, including Created, only ever hold a single value, so no further configuration is needed.
Lookup, Person, and Managed Metadata columns are the exception - these store two values (a display value and an ID). These column types support an optional format property on the field when setting the JSON in Site Analytics.
Taking a Person column type as an example, the following formats can be set in the JSON:
- No format set (default) - sends the display value only, e.g. John Smith
full- sends the display value and ID separated by a semicolon (;); if the field has multiple values (e.g. two people selected), each person's pair is separated by a pipe (|) , e.g. John Smith;jsmith@accelerator365.com|Jane Doe;jdoe@accelerator365.comdisplayName- sends the display value only, e.g. John Smithid- sends the ID value only, e.g. jsmith@accelerator365.com