Configure the SharePoint Site Collection Property Bag
Powered by the Reality Framework, SharePoint platforms of any level of complexity or host location can implement the well-known universal analytics platform from Google. The Framework makes it quick and easy to implement both the Google Analytics and Google Tag Manager integrations with a snap.
As discussed in our overview documentation & products page, the Reality Framework leverages the declarative injection methodology for SharePoint to implement a small bit of script in each page of a site collection. While nicely complimenting both the PnP tools & SharePoint Framework (SPFx), the Reality Framework operates independently including CDN and application codebase to a bit broader scope with ease.
The benefits of having your CDN code throughout every page of the SharePoint ecosystem is primarily to accommodate for 'execute everywhere' tooling like analytics engines. With this in mind, we built hooks for the widely popular Google Analytics and Tag Manager platforms client side scripts. Our hooks get the Universal keys Google issues you from the SharePoint property bag, then with their client scripts, starts tracking.
The Google Analytics and Tag Manager offers a robust suit of tools for dashboards, reporting, and deep click analytics. Together these tools provide unprecedented visibility & behavioral information for the SharePoint ecosystem While your organization may require exploration of paid tools like AdSense, the Google Analytics collection & inspection tooling rivals that of the most expensive SharePoint analytics platforms, and does so For Free.
Check out the Reality Framework's quick install guide for the instructions to setup the solution and get started. Once you have obtained your Google Analytics ( GA ) and Tag Manager ( GTM ) keys, you simply open SharePoint Designer (or PowerShell) to set the keys into the property bag. Once the Framework sees your keys it will do all the work to inject the universal analytics and tag manager code snippets into your SharePoint pages for you. So you can skip that part of any Google instructions.