Feature Pack 8

Configuring default values for an analytics provider

You can configure default values for an analytics provider configuration to apply the default values to all stores that are associated with the analytics provider. By setting site-level default values, you can quickly configure multiple stores to use the same analytics provider settings. You can also override the default values for an individual store.

Before you begin

About this task

When you are defining the default values for an analytics provider configuration, you set the default values within the <biprovider> element for the analytics provider. You can set default values for the same configuration options that are available for each store. To override the default values and configure a value specific to one or more stores, you can include the setting with a different value in the <store> configuration for the stores.

As an example, the following steps demonstrate how to configure default values for an integration with IBM Digital Analytics. For more information about configuring an integration with IBM Digital Analytics, see Configuring the store to communicate with IBM Digital Analytics(biConfig.xml)

Procedure

  1. Open your existing biConfig.xml configuration file at the following path:

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

    To update your analytics provider configuration, update the biConfig.xml file in your development environment and then deploy your file to the WebSphere Commerce enterprise archive (EAR) on your staging or production environment.

    WebSphere Commerce DeveloperFeature Pack 8When you are updating the biConfig.xml file in your development environment, you can use a reload file to help you quickly test configuration changes. By using this reload file, you do not need to continually restart your server to apply configuration changes from the biConfig.xml file. For more information, see Using a reload file to test the analytics integration configuration.

  2. Within the <biproviders> element, add or update the <biprovider> configuration for your analytics provider.
    For example,
    <biprovider name = "coremetrics">
  3. Within the <biprovider> analytics provider configuration, add one or more of the following attributes or elements and set the default value.
    clientid
    The analytics provider client ID, as provided by the analytics provider.
    enabled
    A flag that controls whether the analytics tags in store pages are enabled to send data to the analytics provider. You can set the following values for this flag:
    • true - Analytics tags are enabled.
    • false - Analytics tags are not enabled; analytics data is not sent to the analytics provider.
    debug
    A flag that controls whether debug mode is enabled for the analytics tags. The debug messages display on the store page where the tag is located, generally at the bottom of the page. You can set the following values for this flag:
    • true - Debugging is enabled.
    • false - Debugging is not enabled.
    instrumentation
    This element includes code that is related to the integration between a store and the analytics provider. You can define the default CDATA section within this attribute. For example, code that includes JavaScript libraries or other related tasks specific for the store inside the element, as shown in the following example:
    <instrumentation>
            <![CDATA[
               <script type="text/javascript">
                /* Instrumentation code if any */
               </script>
             ]]>
       </instrumentation>
    Feature Pack 7 or latermarketingCenterEnabled
    Feature Pack 7 or laterThe enablement flag for integrating Management Center with IBM Marketing Center. For more information, see IBM Marketing Center integration.
    Feature Pack 7 or latermarketingCenterUrl
    Feature Pack 7 or laterIf Management Center is integrated with IBM Marketing Center, this element can be used to override the default URL to IBM Marketing Center. For more information, see IBM Marketing Center integration.
    WebSphere Commerce Version 7.0.0.8 or laterincludeShipAdjustInProductPrice
    WebSphere Commerce Version 7.0.0.8 or later1
    The enablement flag that controls whether shipping adjustments are applied to the product prices in an order or to the shipping charge when order data is sent to IBM Digital Analytics. This setting does not affect the order details that a shopper views when they are submitting or reviewing an order.
    true
    The default value. Shipping adjustments are applied to the products in an order instead of being applied to the shipping charge when order data is sent to IBM Digital Analytics. For example, a product costs $40 with a shipping charge of $10. If a promotion that offers a $5 discount on shipping is applied, the order total is $45. When the includeShipAdjustInProductPrice flag is set to true, the order and shopping cart tags send the order data to IBM Digital Analytics. The information that is sent indicates that the order total was $45, the product price $35, not $40, and the shipping charge $10, not $5.
    false
    Shipping adjustments are applied to the shipping charge when data is sent to IBM Digital Analytics. For example, if the includeShipAdjustInProductPrice flag is false in the previous scenario, the information that the order and shopping cart tags send to IBM Digital Analytics indicates that the order total was $45, the product price $40 and the shipping charge was $5.
    Feature Pack 8options
    Feature Pack 8This element with a useDDX attribute is used for integrating WebSphere Commerce with IBM Digital Data Exchange (DDX). For more information, see IBM Digital Data Exchange integration.
    output
    This element includes the JavaScript snippets, or any other content, that you want to write to a specific location in your store pages to track and send analytics data. For example, you can set a default value for the cmSetClientID function settings. You can set the default values for the following cmSetClientID function settings for store production and the test systems.
    Client ID
    The client ID that is provided by the analytics provider. For example, "99999999".
    Data collection method
    The data collection method. You can set one of the following values:
    true
    The data collection is managed by the analytics provider, such as IBM Digital Analytics.
    false
    The data collection is managed by the client for each store.
    Analytics provider domain name
    The domain name for the analytics provider. For example, "data.coremetrics.com".
    WebSphere Commerce server
    The domain name of your WebSphere Commerce server. For example, "thesite.com".
    url
    The URL for launching the analytics provider from Management Center.
    useCookies
    The enablement flag for storing category information in cookies. For more information, see Storing category information in cookies for analytics reporting.
    useHostedCMHLibraries
    Indicates whether the store uses the standard IBM Digital Analytics library. You can set the following values for this flag:
    • true - The standard IBM Digital Analytics library is used.
    • false - The custom IBM Digital Analytics library is used.
    useEmailForCustomerId
    Indicates whether to use an email address instead of a WebSphere Commerce member ID to identify customers in IBM Digital Analytics. You can set the following values for this flag:
    • true - Use the customer's email address as the IBM Digital Analytics customer ID.
    • false - Use the WebSphere Commerce member ID as the IBM Digital Analytics customer ID. This value is the default value.

    When the value is true, a store requires customers to provide their email address when they register and when they place an order as a guest shopper. Using the customer email address as the customer ID is useful when the email address can be collected consistently when customers set up a new account, sign up to receive a newsletter, or complete some other identifying form. For example, by using the email address, you can correlate a customer that completes a product inquiry form on an external site to the same customer that registers with a WebSphere Commerce store. Using the email address can also help you to track multiple orders that are placed by the same guest shopper. When a customer places an order, a guest shopper is assigned a different unique member ID each time; however, the guest shopper's email address is likely to stay the same.

    The customer ID parameter is passed to IBM Digital Analytics in the cmCreateRegistrationTag data tag (which is generated by the <cm:registration /> tag), and in the cmCreateShopAction9 and cmCreateOrderTag data tag (which are both generated by the <cm:order /> tag).

    segmentExportMode
    Indicates the export mode to use when you update IBM Digital Analytics based customer segments. For more information, see Configuring the export mode for IBM Digital Analytics based customer segments.
  4. Optional: Override the default settings for an individual store or stores that need to use different configuration settings.
    1. Within the <stores> element, add or update the <store> configuration for the stores. Within this configuration, you must associate the store with the analytics provider.
      If you want a store to use only the default values, you still need to associate the store with the analytics provider by including the following <store> element configuration:
      <store storeId="10101" biprovider="coremetrics">
      ...
      </store>
      
      Where
      storeId
      The ID of the store or stores that you are associating with an analytics provider. When you are configuring the analytics reporting options for multiple stores, you can apply one configuration to multiple stores by including a list of store ID values. You can also copy the sample configuration to create multiple configurations and apply each configuration to one or more stores. You can specify the storeId value in the following formats:
      1. A single storeId value.
      2. A comma-separated list of storeId values. For example, specify storeId="10000, 10001" to enable IBM Digital Analytics for two stores by using the same IBM Digital Analytics client ID and tag library that is defined in the configuration.
      3. A range of storeId values. For example, specify storeId="10000-10200" to enable IBM Digital Analytics for all of the stores that have storeId values that fall within the range that include the specified upper and lower bounds. The stores that are specified in the range must share the IBM Digital Analytics client ID and tag library that is defined in the configuration.
      biprovider
      The name of the analytics provider. This name is the same as the name value that is specified in the <biprovider> element.
    2. Within the <store> configuration element, add or update any of the following attributes or elements to override the default values.
      For the <output> element, you can override the individual configurations within the element.
      • enabled
      • debug
      • instrumentation
      • marketingCenterEnabled
      • marketingCenterUrl
      • options
      • output
      • url
      • useCookies
      • useHostedCMHLibraries
      • useEmailForCustomerId
      • segmentExportMode
    3. Save and close the file.
      As example, the following sample biConfig.xml sets default values for 5 stores and includes overrides for three stores. two stores include only the configuration to associate the store with the analytics provider.
      <BIConfiguration>
        <ssoKey></ssoKey>
        <biproviders>
          <biprovider name="coremetrics"
            enabled="true" debug="true" 
            marketingCenterEnabled="true"
            useHostedCMHLibraries="true" 
            useEmailForCustomerId="false" 
            segmentExportMode="append" >
            <useCookies>true</useCookies>
            <clientid>69999999</clientid>
            <url>https://welcome.coremetrics.com/analyticswebapp/analytics.jsp</url>
            <marketingCenterUrl>https://mc.coremetrics.com/mcwebapp/welcome.do</marketingCenterUrl>
            <options>
              <attribute name="useDDX" value="true"/>
            </options>
            <output section="header">
              <![CDATA[
              <script type="text/javascript" src="//libs.coremetrics.com/eluminate.js"></script> 
              <script type="text/javascript"> 
              cmSetupNormalization("krypto-_-krypto");
              
              // send data to production system 
              //cmSetClientID("99999999",true,"data.coremetrics.com","thesite.com"); 
              
              // send data to test system 
              cmSetClientID("69999999",false,"testdata.coremetrics.com","thesite.com"); 
              </script> 				
              ]]>
            </output>
            <header>
              <![CDATA[<script type="text/JavaScript">
              <!--
              ]]>
            </header>
            <footer>
              <![CDATA[
              //-->
              </script>]]>
            </footer>
          </biprovider>
        </biproviders>
       
        <stores>
         <store storeId="10101, 10102" 
            biprovider="coremetrics" 
            marketingCenterEnabled="false" >
            <useCookies>false</useCookies>
            <options>
              <attribute name="useDDX" value="true"/>
            </options>
          </store>
          <store storeId="10103" 
            biprovider="coremetrics" 
            marketingCenterEnabled="false"
            useEmailForCustomerId="true" >
            <options>
              <attribute name="useDDX" value="true"/>
            </options>
          </store>
          <store storeId="10104, 10105" biprovider="coremetrics" />
        </stores>
      </BIConfiguration>   
  5. Restart the WebSphere Commerce server to apply your changes if you are not using a reload file.
1 You must apply the interim fix for APAR #JR54225 to use this parameter.