Getting Started
Important note: The script installs only to the scj folder. All script files remain there—nothing is written to your domain root or elsewhere. The out.php file is in scj/cgi but can be moved to the domain root if needed. Remember: if you move out.php, index.php, or include.php, you must also copy common.php to the same location.
If you plan to use the built-in rotation and trading system, go to New Rotation Step By Step
For trading only, choose one of the two traffic tracking options below—don't combine them.
1. The simplest option:
If you have a SHTML page then you need to add
<!--#include virtual="/scj/cgi/include.php?${QUERY_STRING}"-->
If you have a PHP page
<?php include_once ('./scj/cgi/include.php'); ?>
2. Advanced setup with redirect tracking.
Copy index.php, common.php, and out.php from the scj/cgi directory to where your users enter (usually the domain root). If you already have other files with these names, rename or move them first.
Next, create the required number of pages (skins) and specify them to the script in Settings→CJ Pages.
The script will rotate the specified pages for surfers in turn. I.e. on the first visit, the surfer will go to http://yourdomain.com/page1.html
on the second http://yourdomain.com/page2.html
on the 3rd /usr/home/yourdomain.com/page3.html
then it starts over.
Pages page1.html, page2.html and so on are your pages with design, includes, etc. So in this option you need to do 2 actions:
- Rewrite the files
- Specify the path or URL to the page that the surfer will see.
You don't need to add anything to the page itself.
You can specify pages in 2 ways: - Page URL - Page Path
What's the difference? If you specify a URL, then the surfer will be redirected to the specified page. The specified page can be some script or shtml page. But there's a redirect, i.e. a slight delay. If you specify a path, then the script just displays the specified file, but there's no redirect and therefore no delay. In the second case you can also use php in the file.
3. Multi-page sites with archives.
If your site has multiple pages beyond the main index where visitors land, add this tracking code to each page:
For SHTML:
<!--#include virtual="/scj/cgi/include.php?${QUERY_STRING}"-->
For PHP:
<?php include_once ('./scj/cgi/include.php'); ?>
You can also use this method for single-page sites. It's similar to option 2, just more convenient when you have multiple pages.
Just add the code to each page you want to track—that's it.

