If you're using an external rotator, follow these examples to integrate it with SmartCJ.
1. Go to Settings > General Settings and configure:
2. Connect ST and SmartCJ using one of these two methods:
`<!–#include virtual=“/scj/cgi/include.php?${QUERY_STRING}”–>`
Groups in ST — To use groups, create links with a group variable:
<a href="#ur0_group10#&var1=pictures" ..
Then set your Thumb trade script URLs in ST admin:
`/scj/cgi/out.php?url=#url#&group=#var1#`
To track traffic with Stream:
0. Follow the setup in Start Here — rewrite index.php, out.php, and common.php to your domain root.
1. Create `main.php` with this content:
`<?php include("streamrotator/in.php");?>`
and upload it to your domain root.
2. In SmartCJ Settings > CJpages, enter the PATH (not URL) to main.php.
3. In your Stream template, write a link to out like this:
`href="stream/out.php?l=#POS#&u=/scj/cgi/out.php?url=#GAL#"`
(Adjust paths as needed for your setup.)
To integrate Rolling Thumbs with SmartCJ, set the log type in Rolling settings to “SmartCJ.”
Tech support note: The path setting doesn't matter for Smart. The key requirement is that Rolling Thumbs and SmartCJ use the same database. If they don't, migrate the Rolling Thumbs database to the SmartCJ database (the tables don't overlap) and update the database name in `rt/lib/mysql/db_config.php`.
Example: If you want to pass `&link` to SmartCJ: