Customizing the Webtrends JavaScript Tag

If you need to customize the Webtrends JavaScript (to change the DCSID for a given site collection, for example), you can modify the webtrends.load.js file.

SharePoint Designer is required for customizations installed on any machine.

If you customize a tag on an activated site and then deactivate the site, you will lose any customizations to the tag.

  1. In SharePoint Designer, click Open Site (File > Sites > Open Site) and choose the URL of the activated site to confirm that it has JavaScript tags.
  2. Locate webtrends.load.js. If you followed the steps for instrumenting SharePoint without the installer, webtrends.load.js will be located in Lists/WebtrendsAssets within the site collection.
  3. Identify the call to init. For example:
    var dcs = new Webtrends.dcs().init({
                        dcsid: "YOUR_WEBTRENDS_DCSID_HERE",
                        timezone: "YOUR_TIMEZONE_HERE",
  4. Update the configuration options as desired. For more information on customizing the tag, see Webtrends JavaScript Tag.
  5. If you want to turn off heatmaps, comment out this line:
    hm: { src: "//" }