O'Reilly logo

SharePoint 2013 WCM Advanced Cookbook by John Chapman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Storing analytics tracking code with a site collection settings page

Though SharePoint includes some analytic features, many still prefer to use third-party web analytics providers such as Google Analytics. These analytics providers use a snippet of JavaScript code that is added to each page in most cases.

In this recipe, we will create a settings page to allow site collection administrators to store the JavaScript code on a per site collection basis.

Getting ready

We should have already created our Visual Studio project in the Creating a Visual Studio solution for custom delegate controls recipe of this chapter before starting this recipe.

How to do it...

Follow these steps to create a settings page for our tracking code:

  1. Open the project created in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required