ATG Recommendations API Flavors
The Need for Flavors
The ATG Recommendations API is available in a variety of flavors enabling retailers to balance their recommendation needs with their existing infrastructure and bandwidth requirements.
Picking a Flavor
Only one flavor of the ATG Recommendations API may be included on an HTML page. The available flavors of the ATG Recommendations API:- cleverset-2.js This is our most commonly used flavor. It includes our full suite of functionality and renderering capabilities.
- jQuery-less Version
The ATG Recommendations API makes extensive use of the superb jQuery library. All flavors are also available in a version that does not embedded jQuery. These flavors assume that a retailer is already using jQuery and does not want to incur the bandwidth cost of downloading it twice. It is mandatory that an appropriate version of jQuery be available, or the ATG Recommendations API will fail to function. These jQuery-less flavors are used by including the string “-extjq” immediately before the version number in the
.jsfilename.Please Note: The ATG Recommendations API supports the use of jQuery versions 1.1.2 through 1.1.4. If you are using a different version the ATG Recommendations API will fail silently.
Example:
<script type="text/javascript" charset="utf-8" src="//static.cleverset.com/js/cleverset-extjq-2.js"></script>
- Test Mode
All API flavors are also available in an unpacked test mode. The test mode files contain a substantial amount of debugging output. Also, because it is uncompressed these files take longer to load. These test mode flavors are used by including the string “-test” immediately after the version number in the
.jsfilename.
Example:<script type="text/javascript" charset="utf-8" src="//static.cleverset.com/js/cleverset-2-test.js"></script>
- Enabling Debug Output Capture
When a test mode flavor is in use the API will look for an element with the id “cs-debug”. Output will be inserted into this div, creating a log of executed functions.
Example:<!-- DIV strictly for logging activity to in test mode. Not required, used, or recommended for production. --> <div id="cs-debug" style="border: 1px dashed #c00; background-color: #fcc; margin-bottom: 25px; padding: 5px; color: #900; font: 11px Bitstream Vera Sans Mono, monospace"> <div style="font-weight: bold">Debug Output:</div> </div>
- Enabling Debug Output Capture
When a test mode flavor is in use the API will look for an element with the id “cs-debug”. Output will be inserted into this div, creating a log of executed functions.
