|
To enable Sales-n-Stats to gather information about the visitors' activity on a specific site, you need to integrate Sales-n-Stats tracker into that website. The tracker is a script that can collect different kinds of data about your visitors by capturing form elements and span tag values and send them to the Data Center.
The integration of the site tracker is carried out by inserting a piece of code into site pages. As the tracker needs to be present on every page of the site that you want to be monitored, the best way to integrate it is to include the piece of code that calls on the tracker script into the site header/footer area or a template present in each of the site pages. If for some reason the code cannot be included in such a way, you have to insert it into each of the pages of your site manually.
When inserting the code into a web page, make sure you place it within the body of the page only once:
<html>
<head>
</head>
<body>
The code goes here
</body>
</html>
Create the necessary code using the HTML Code Generator or manually by using the following template:
<!-- [Sales-n-Stats Site Tracker] -->
<script>
var sns_location=(window.location.protocol == "https:")?
"{HTTPSCollectorRoot}" :
"{CollectorRoot}";
document.writeln('<script src="'+sns_location+'/tracker.js.php"><\/script>');
</script>
<NOSCRIPT><IMG src="{CollectorRoot}/static.php" width="1" height="1"></NOSCRIPT>
<!-- [/Sales-n-Stats Site Tracker] -->
where:
| • | {CollectorRoot} is the full URL of the Data Collector directory you entered in the process of Sales-n-Stats installation (such as http://example.com/my/collector/path). This URL must correlate with the cookie domain and cookie path in the Data Collector. If it does not, visitors might be identified incorrectly (for example two visitors can be identified as one). |
For example:
CollectorRoot: http://example.com/my/collector/path
cookie domain: example.com
cookie path: /my/collector/path
| • | {HTTPSCollectorRoot} is the full URL of the Data Collector HTTPS directory (such as https://example.com/my/collector/path). |
Note: To ensure the correct operation of the site tracker specify the location of the script by entering the absolute path to the Data Collector.
|