Reference > Analytics for IBM WebSphere Commerce > Integrate a store with Coremetrics for IBM WebSphere Commerce > Implement Coremetrics for IBM WebSphere Commerce
Configure the site to communicate with Coremetrics
Overview
Tag library setup and configuration is controlled by...
WC_EAR/xml/config/bi/biConfig.xml...which contains the following data about each Web store:
- Which analytics provider is being used.
- Whether tracking is enabled.
Tracking refers to whether the data will be sent to Coremetrics.
- Whether debug mode is enabled.
The debug messages will appear on the Web page where the tag is located, generally at the bottom of the page.
- The location of any vendor-specific code required for tracking.
Configure the site to communicate with Coremetrics
- Edit biConfig.xml
- Update the store's reporting options...
<store storeId="10001" biprovider="coremetrics" enabled="false" debug="false">
storeId can be...
- A single storeId
- A comma separated list of storeIds.
For example, to enable Coremetrics for two stores using the same Coremetrics clientId, and JavaScript libraries defined in the configuration.
storeId="10000, 10001"
- A range of storeIds.
For example, to enable Coremetrics for all stores that have storeId values within a range...
storeId="10000-10200"The stores specified in the range will share a Coremetrics clientId and the JavaScript libraries defined in the configuration.
Analytics enabled is either true or false.
Debug mode is either true or false.
- Update the store's Coremetrics client ID to match the store's client ID as provided by Coremetrics.
<clientid> clientID</clientid>
- Find the following lines of code:
<script language="JavaScript1.1" type="text/JavaScript" src="/wcsstore/coremetrics/v40/eluminate.js"> </script> <script language="JavaScript1.1" type="text/JavaScript" src="/wcsstore/coremetrics/cmdatatagutils.js"> </script> <script language="JavaScript1.1" type="text/JavaScript"> <!-- //cmSetProduction(); //-->
In Coremetrics implementations prior to September 2007 (using eluminate.js 4.1.1 or earlier), look for the following code:
<script language="JavaScript1.1" type="text/JavaScript" src="/wcsstore/coremetrics/v40/eluminate.js"> </script> <script language="JavaScript1.1" type="text/JavaScript" src="/wcsstore/coremetrics/v40/techprops.js"> </script> <script language="JavaScript1.1" type="text/JavaScript" src="/wcsstore/coremetrics/cmdatatagutils.js"> </script> <script language="JavaScript1.1" type="text/JavaScript"> <!-- //cmSetProduction(); //-->
Update these paths to reflect your system. The files are not included by default; however, when you sign up with Coremetrics, these files will be provided to you.
Coremetrics for IBM WCS requires that you call their main method, cmSetProduction().
The main method, cmSetProduction() is commented out because by default, the data goes to the Coremetrics test server; however, uncomment the line when you have completed testing, and are ready to send the data to the Coremetrics production server.
- Deploy customized assets to the production server following the instructions for deploying a single file.
Updating the file using the WAS update utilities will protect the file's contents from being overwritten when installing a WCS fix pack or migrating to the next WCS.
- Restart WCS.
Next topic: Generate a file that captures the catalog hierarchy
Related tasks
Implement Coremetrics for IBM WCSa>
Related reference
Sample: biConfig.xml file for Coremetrics