Getting Started

The JavaScript Tag provides a highly customizable integration that allows you to send data to Webtrends every time a significant event occurs on your pages. You can start with a basic implementation, which captures page views with very little coding. 

Note: The V10 JavaScript tag requires SmartSource Data Collector version 9.2.1 or higher.

Depending on the space type you're tagging for, the download contains one of the following sets of files:

For a Website space:

For a Mobile Website space:

Note: For a description of the differences between Website and Mobile Website tags, see Website Tag vs. Mobile Website Tag.
Note: We use the Google Closure Compiler with Advanced Optimizations to minify the JavaScript files.

webtrends.load Setup

Note: Using this method eliminates the need to retag your site when configuration changes are made.
  1. Save the webtrends.min.js and webtrends.load.js files in a common JavaScript location on your web server.
  2. Edit the path referenced in webtrends.load.js so that it points to the actual location of webtrends.min.js.
  3. Edit the path referenced in webtrends.load.html so that it points to the actual location of webtrends.load.js.
  4. Paste the contents of webtrends.load.html on every page in your web site.
    Note: To avoid logging hits to pages that do not load completely, and to ensure best performance, paste this code inside the <head> section of your web page.

Basic Setup

  1. Save the webtrends.min.js file in a common JavaScript location on your web server.
  2. Edit the path referenced in webtrends.html so that it points to the actual location of webtrends.min.js.
  3. Paste the contents of webtrends.html on every page in your web site.