Reference > Analytics for IBM WebSphere Commerce > Integrate a store with an external analytics system (other than Coremetrics)


Update the biConfig.xml file

All the configuration information used by the analytics tags must be defined in the biConfig.xml file. You must update this file to include vendor-specific information.

Within <header> and <footer> elements of the biConfig.xml file, you can include any common JavaScript functions or statements that need to be placed in the store JSP files along with the tagging functions.


Procedure

  1. Open the biConfig.xml file at the following path:

    WCDE_INSTALL/workspace/WC/xml/config/bi/biConfig.xml

  2. Locate the <biproviders> element.

  3. Within the <biproviders> element, paste the following lines of code:

    <biprovider name="myProvider">        
    <header>        
    </header>        
    <footer>        
    </footer>
    </biprovider>
    

  4. Replace the value myProvider with the name of the vendor.

  5. Within the <header> element, place any vendor-specific common JavaScript snippets that include in the store pages before invoking the tagging functions, as shown in this example:

    <biprovider name="myProvider">        
       
    <header> 
          
    <!-- 
              Any vendor specific JavaScript snippets that should come 
              before invoking the analytics vendor tagging functions 
           -->         
          
    <![CDATA[             
              
    <script type="text/javascript">               
                 /* Header if any */                       
               
    </script>           
           ]]>        
      
    </header>
    

  6. Within the <footer> element, place any vendor-specific common JavaScript snippets that include in the store pages after invoking the tagging functions, as shown in this example:

    <biprovider name="myProvider">     ...
        ...
           
    <footer>         
    <!-- 
              Any vendor specific JavaScript snippets that should come 
              after invoking the analytics vendor tagging functions 
             -->    
                
    <![CDATA[
                
    <script type="text/javascript">               /* Footer if any */
                
    </script>            ]]>        
    </footer>
    

  7. Locate the <stores> element.

  8. Within the <stores> element, paste the following lines of code:

    <store storeId="10101" biprovider="myProvider" enabled="true" debug="true">   
    <instrumentation>   
    </instrumentation>
    </store>   
    

  9. Update the StoreId value with the value for the store you are integrating with the external system.

  10. Update the biprovider value with the same name of the vendor that you specified in an earlier step.

  11. Within the <instrumentation> element, place any instrumentation code, for example, code that includes vendor-specific JavaScript libraries or other related tasks specific for the store inside the element, as shown in the following example:

    <store storeId="10101" biprovider="myProvider" enabled="true" debug="true">    
    <instrumentation>        
    <![CDATA[
              
    <script type="text/javascript">             /* Instrumentation code if any */
              
    </script>          ]]>   
    </instrumentation>
    </store>   
    

  12. Save the file.

  13. Restart the WebSphere Commerce server.


Example

The following is an example of a completed biConfig.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<BIConfiguration>   
<biproviders>     
<biprovider name="myProvider">        
<header>           
<![CDATA[
            
<script type="text/javascript">                /* Header if any */
             
</script>            ]]>        
</header>        
<footer>           
<![CDATA[
            
<script type="text/javascript">               /* Footer if any */
            
</script>            ]]>        
</footer>     
</biprovider>   
</biproviders>   
<stores>      
<store storeId="10101" biprovider="myProvider" enabled="true" debug="true">         
<instrumentation>            
<![CDATA[
              
<script type="text/javascript">                 /* Instrumentation code if any */
              
</script>             ]]>         
</instrumentation>      
</store>   
</stores>
</BIConfiguration>


Previous topic: Create a tag library definition file


Next topic: Tag the store pages for the external analytics system


+

Search Tips   |   Advanced Search