Inserting a Full SAS Page Tag

Overview

Sometimes you want to process more than the default data elements provided by the minimal tag, and you want to be able to customize how the data is collected. In these cases, you can insert a full tag into the pages of interest on your Web server. This page tagging approach enables you to specify the data elements that you collect and customize the configuration for the tagging implementation. It also enables you to use debug mode during the initial integration and testing of the tag code that you are inserting into your Web pages. Most tagging implementations use full SAS page tags.
You can insert a full tag into the pages of interest on your Web server. You should understand that the minimal and full tag code yield the same data by default. Also, the minimal tag can be customized within the page if you use st_pageCfg() and st_pageDats() values. The full tag offers the following advantages:
  • enables site-wide configuration values to be set by using SASSiteCfg.js
  • enables the debug mode
  • gathers a simple page load for browsers with JavaScript disabled

Insert a Full SAS Page Tag

Insert the following code to the end of the <BODY> section of each page of interest, right before the body close tag, </BODY>. After the setup has been completed, data collection takes place in each tagged page by virtue of the call to st_init() that is made in the JavaScript.
01 <script language="javascript" type="text
/javascript" src="http://ccs.domain.com/sastag/SASTag.js"></script>
02 <script language="javascript" type="text/javascript" src="http:
//ccs.domain.com/sastag/SASSiteConfig.js"></script>
03 <script language="javascript" type="text/javascript">
04		function st_pageCfg {
05		// Place configuration values here	
06		}
07		function st_pageDats {	
08		// Place data values here
09		}
10 </script>
11 <script language="javascript" type="text/javascript" src="http:
//ccs.domain.com/sastag/SASTagDebug.js"></script>
12 <script language="javascript" type="text/javascript">
st_init();</script>
13 <noscript><img src="http://ccs.domain.com/sastag
/SASTag.gif?JS=0$URI=/TagsDisabled" border="0"></noscript>
Before you insert the code into your pages, you must ensure that the protocol and domain http://ccs.domain.com match the domain name of the clickstream collection server that contains the tag code. If you are collecting data over Secure Socket Layer (SSL), then the https prefix should be used instead of http.
The following table provides a line-by-line explanation of the full page tag.
Line-By-Line Explanation of the Full SAS Page Tag
Line Number
Explanation
Line 1 (required)
Includes the SAS Tag code. This code includes and defines the st_init() function, as well as all of the data elements and default configuration settings for the tagging solution. After this line has been executed in the browser, st_init() is available to be called (line 12). Then the default tagging information is sent to the clickstream collection server.
Line 2 (optional)
Includes the default shared site configuration settings. This file is normally copied, renamed, and edited to set common site-specific configuration settings for data collection that applies across all pages into which it is included. The link in Line 2 then normally points to this copy.
Lines 3 to 10 (optional)
Enable page-specific configuration and data values to be set. Settings made here can override the product defaults and the site-wide settings and data values included in Line 2.
Line 11 (optional)
Useful to include when initially tagging pages to aid in testing. Inclusion of this line results in a pop-up debug window appearing as the data is being gathered. This feature provides more information about what is being collected. Note that you should be careful not to include this line in your production configuration or your users will also get this pop-up window. Also note that you must disable pop-up blocking software that prohibits this window from being displayed.
Line 12 (required)
Initializes the tagging code for the page. This line results in instrumentation of elements on the page and collection of data about the page load event.
Line 13 (optional)
Used when JavaScript is not enabled in the user’s browser and the tag code cannot run. This line minimally makes an indication of this by requesting the tag image with a static set of information to indicate that JavaScript was not enabled. The page is tagged, but the information is not as rich as if JavaScript were enabled. This line is necessary only if you want to gather information about hits from users that have JavaScript disabled.
For information about the types of customizations that you can make to a full SAS page tag, see Customizing a Full SAS Page Tag.