Inserting a Minimal Tag

Problem

You want to insert the minimal amount of code on each Web page, and you are interested in the default data that is collected.

Solution

You can insert a minimal page tag into the pages of interest on your Web server. You can use this approach to minimize data elements collected, but a typical clickstream tagging implementation uses a full page tag that yields more data because it can be customized. When you use a minimal tag configuration, the following default tracking settings are used:
  • predefined data elements, which are collected on page load
  • link clicks to all file types except the following: .htm, .html, .asp, .jsp, aspx, .cfm, .do, and .php
  • all cookies
  • all meta tags
Use the full tag configuration to modify default tracking configuration by using JavaScript API calls. For more information, see Inserting a Full Page Tag in the SAS Data Surveyor for Clickstream Data 2.1 Page Tagging JavaScript Reference at http://support.sas.com/rnd/gendoc/clickstream/21M1/en/.

Tasks

Insert a Minimal Page Tag

To tag a page, add the appropriate tag code to the end of the <BODY> section of each page of interest, right before the body close tag, </BODY>. The minimal code required to tag a page is as follows:
<script language="javascript" type="text/javascript" 
   src="http://ccs.domain.com/sastag/SASTag.js"></script>
<script language="javascript" type="text/javascript">st_init();</script>
Before you insert the code into your pages, the protocol and domain http://ccs.domain.com must match the domain name of the clickstream collection server that contains the tag code. If you are collecting data over Secure Socket Layer (SSL), the https prefix should be used instead of http.