Manual Installation of SharePoint 2013, 2016, or SharePoint Online/Office 365 Tag

You should have 4 files for tagging:

  1. load.js
  2. .js
  3. sp.js
  4. ups.js (optional)

Follow these steps to modify and deploy the Webtrends .js tag:

  1. Create a new Document Library or List on the site and label it WebtrendsAssets for easy identification.
    • Take note of the URL to this folder. It should appear similar to the following:
  2. Open the webtrends.load.js file for editing.
  3. Paste the code at the end of this document into the top of the file, so that it appears before the window.webtrendsAsynInit = function () { entry.
    • This content is normally inserted into the page by the App. When tagging manually, you must configure this content yourself for the webtrends.load.js to use.
  4. Take note of the options highlighted in red.
    1. Updated the window.wt_sp_globals.url with the URL noted in Step 1.
    2. Update the domain field with the appropriate SDC server domain.
    3. Update the dcsid with the appropriate dcsid.
    4. Update the timezone with the appropriate numerical time zone. Do not use text designations such as PST or GMT.
    5. Update the homesite with the URL of your Site Collection.
      • This is used for the allClick tracking if enabled to determine if a link is on-site or off-site.
  5. Take note of the options highlighted in green.
    1. These pertain to using the User Profile Service.
    2. If you do not want to use the User Profile Service API call to gather extra user information:
      • Remove the code in green from the plugins: {} section.
      • Change window.wt_sp_globals.configs.plugins.sp.extraUserInfo to false.
  6. Enable/disable options for the SharePoint Plugin at the bottom of the configuration, if desired.
  7. Update the element IDs for the breadcrumb (breadid), search box (searchBox), and user name (pritopleveluserid and sectopleveluserid) as appropriate for the site.
  8. Update the searchPage entry with the appropriate search page for your site. If you have more than one search results page URL, you can add a comma delimited list (no spaces in between).
  9. Save your changes.
  10. Upload all four files into the folder you created in Step 1.
  11. Check out your master page.
    1. Edit your master in your preferred editor.
      • SharePoint Designer does not publish changes properly with SharePoint Online. You must download a copy, edit the file locally and then upload the new copy to properly implement the tagging.
    2. In the <head> section, paste the following code utilizing the URL you created in Step 1:
      <script type=”text/javascript” src=”//"></script>
  12. Save your changes and upload/publish the master page.
  13. Ensure your tag is placed in both master pages (if applicable).

Your site is now tagged. To verify functionality:

  1. Open a browser.
  2. Open the debugger (usually F12).
  3. Verify that the webtrends.load.js file is present in the script sources.
    • If it is not loaded, the URL from Step 13 is probably invalid. Update the file path with the proper URL to reach the webtrends.load.js file.
  4. Verify that the webtrends.js, webtrends.sp.js and, if you’re using it, the files are properly loaded.
    • If they are not loaded, ensure that the file paths used within the webtrends.load.js are correct. The window.wt_sp_globals.url entry near the top should point to the folder where the Webtrends files are contained.
  5. Verify using the network tools section of the debugger, or a third party HTTP Proxy such as Fiddler, that beacon requests are being sent to the SDC domain outlined in the configuration below:

Content used to modify Webtrends.load.js file:

// BEGIN Manual Configuration for non-App installation
window.wt_sp_globals = window.wt_sp_globals ? window.wt_sp_globals : {};
window.wt_sp_globals.loadCount = 0;
window.wt_sp_globals.baseTagUrl = "//";
window.wt_sp_globals.url = "";

window.wt_sp_globals.configs = {
domain: “”,
dcsid: “xxxxxxxxxxxxxxxxxxxxxxxxx_xxxx”,
timezone: “-8”,
homesite: “”,
downloadtypes: “xls,doc,ppt,pdf,csv,zip,gzip,oft,ics,vsd,txt,wmv,xps,gif,jpg,mp4,xsn,msg,xap,pub,js”,
i18n: true,
preserve: true,
debug: false,
plugins: {
ups: {
src: wt_sp_globals.url + “”,
async: false,
waitForCallback: true,
timeout: 7500
sp: {
src: wt_sp_globals.url + “webtrends.sp.js”,
async: false,
waitForCallback: true,
timeout: 7500

if (typeof window.wt_sp_globals.configs.plugins.sp !== ‘undefined’) {
window.wt_sp_globals.configs.plugins.sp.extraUserInfo = true;
window.wt_sp_globals.configs.plugins.sp.username = true;
window.wt_sp_globals.configs.plugins.sp.content = true; = true;
window.wt_sp_globals.configs.plugins.sp.bread = true;
window.wt_sp_globals.configs.plugins.sp.webparts = true;
window.wt_sp_globals.configs.plugins.sp.documentMenuClick = true;
window.wt_sp_globals.configs.plugins.sp.list = true;
window.wt_sp_globals.configs.plugins.sp.socialMenuClick = true;
window.wt_sp_globals.configs.plugins.sp.allClick = false;
window.wt_sp_globals.configs.plugins.sp.webPartLimit = “40”;
window.wt_sp_globals.configs.plugins.sp.debugmode = window.wt_sp_globals.configs.debug;
window.wt_sp_globals.configs.plugins.sp.ids = {};
window.wt_sp_globals.configs.plugins.sp.ids.breadid = “DeltaPlaceHolderPageTitleInTitleArea”;
window.wt_sp_globals.configs.plugins.sp.ids.pritopleveluserid = “SuiteNavUserName”; // zz4_Menu for 2013
window.wt_sp_globals.configs.plugins.sp.ids.sectopleveluserid = “null”; // zz5_Menu for 2013
window.wt_sp_globals.configs.plugins.sp.ids.searchBox = “DataProvider”;
window.wt_sp_globals.configs.plugins.sp.ids.searchPage = “osssearchresults.aspx,results.aspx,search.aspx”;
// END Manual Configuration for non-App installation