Configure the store to communicate with IBM Digital Analytics(biConfig.xml)

Configure settings in the biConfig.xml file so that integration with is enabled and configured for the store.


Before beginning

Review the following information about the sample biConfig.xml file that is provided with WebSphere Commerce:

Sample biConfig.xml file for IBM Digital Analytics


Task info

When we are updating the biConfig.xml file to define the analytics provider configuration, we can set default values for each configuration setting. By setting default values, we can quickly configure multiple stores to use the same configuration for an analytics provider. We can also override any of the default values for an individual store by including a different value in the configuration for the store. See Configure default values for an analytics provider.


Procedure

In your development environment, define your biConfig.xml file.

(Developer) When we are updating the biConfig.xml file in your development environment, we 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.

  1. Go to the following directory, which contains the sample biConfig.xml file: WCDE_installdir/samples/Coremetrics/xml/biConfig.xml

  2. Open the biConfig.xml file for editing.

  3. Configure the analytics reporting options for each store that must be associated with an analytics provider:

    1. Find a line similar to the following code:

        <store
            storeId = "10101"
            biprovider = "coremetrics"
            enabled = "true"
            debug = "true"
            marketingCenterEnabled="true"
            useHostedCMHLibraries = "true"
            useEmailForCustomerId = "false"
            segmentExportMode = "append">

      When we are configuring the analytics reporting options for multiple stores, we can apply one configuration to multiple stores by including a list of store ID values. We can also copy the sample configuration to create multiple configurations and apply each configuration to one or more stores.

    2. Change the value for the store ID and analytics provider identifier to associate the store to the analytics provider. We can set values for the following attributes:

        storeId
        Specifies the storeId of the store or stores that we want to enable for IBM Digital Analytics. We can specify the storeId value as:

        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 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 specified in the range must share the IBM Digital Analytics client ID and tag library that is defined in the configuration.

        biprovider
        The analytics provider. Leave this value set to coremetrics.

    3. Set values for any of the following reporting options to configure for each store.

      If you configured any default values for an analytics provider, we can override any of these values by setting store-specific values. To use a default value again, remove the store-specific value.

        clientId
        The client ID for the store, as provided by the analytics provider.

        enabled
        Indicates whether tracking is enabled, which means that analytics data is sent to IBM Digital Analytics. Values are true or false.

        debug
        Indicates whether debug mode is enabled. The debug messages display on the web page where the tag is located, generally at the bottom of the page. Values are true or false.

        instrumentation
        Instrumentation code that is related to the integration between a store and the analytics provider. 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>

        You can define the default CDATA section within this attribute

        marketingCenterEnabled
        The enablement flag for integrating Management Center with . See
        ../../emm/tasks/tmtmarketingcenterintegration.htm.

        marketingCenterUrl
        If we are integrating Management Center with , we can include this element to override the default URL to IBM Marketing Center. See ../../emm/tasks/tmtmarketingcenterintegration.htm.

        includeShipAdjustInProductPrice
        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.

        options
        If we are integrating with IBM Digital Data Exchange (DDX), we can include this element and the useDDX attribute with a value of "true" to enable the integration. For more information about this integration, see IBM Digital Data Exchange integration.

        output
        The JavaScript snippets, or any other content, to write to a specific location in the store pages.

        url
        The URL for launching the analytics provider from Management Center.

        useCookies
        Indicates whether category information is stored in cookies. See Storing category information in cookies for analytics reporting.

        useHostedCMHLibraries
        Indicates whether the store uses the standard IBM Digital Analytics library. Values are true for the standard IBM Digital Analytics library or false for the custom IBM Digital Analytics library. Leave this value set to true.

        useEmailForCustomerId
        Indicates whether to use an email address instead of a WebSphere Commerce member ID to identify customers in IBM Digital Analytics Valid values are:

          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.

        Set this parameter to true only if the store requires customers to provide their email address when they register and when they place an order as a guest shopper. Using the customer's email address as the customer ID is useful if only 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, using the email address, we 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. See tmtconfigsegbiconfig.htm.

  4. Optional: Configure your analytics reporting for each store to use cookies to store category information.

  5. Set the IBM Digital Analytics client ID for each store:

    1. Find the following line:

         <clientid>69999999</clientid>

    2. Replace 69999999 with client ID for the store, as provided by IBM Digital Analytics: This value controls which client ID the integration uses to launch IBM Digital Analytics reports from Management Center.

      • To launch reports from the IBM Digital Analytics test server, use your test client ID, which typically starts with the digit 6.

      • To launch reports from the IBM Digital Analytics production environment, use your production client ID.

  6. Optional: Configure the <url> element for each store to override the default URLs to open your analytics provider from Management Center.

  7. Update the <output> element contents for each store:

    1. Find the following lines:

        <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>

    2. Replace 99999999 with your IBM Digital Analytics production client ID.

    3. Replace 69999999 with your IBM Digital Analytics test client ID.

      Notice that the line that contains our production client ID is commented out, whereas the line that contains your test client ID is not. This ID means that your analytics data is sent to the IBM Digital Analytics test server initially. When we are ready to send data to the production environment, we can comment out the line that contains your test client ID, remove the comments from the line that contains our production ID, and then switch the client ID you configured in step 5.a to your production client ID.

      If we are using using IBM Digital Analytics Multisite, with a Multisite Analytics Client ID such as '88888888' and a Sub-ID, where <SiteID> is the configured Multisite Analytics Sub-ID, then to send to production, update the cmSetClientID() to:

        cmSetClientID("88888888|SiteID",true,"data.coremetrics.com","thesite.com");

      For more information, see cmSetClientID.

    4. Replace both occurrences of thesite.com with the domain name of the WebSphere Commerce server.

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

  9. Optional: To configure single sign-on between Management Center and IBM Digital Analytics, we can add secret key for single sign-on to your biConfig.xml file now. Alternatively, we can configure single sign-on later. For complete steps, see Configure single sign-on between Management Center and IBM Digital Analytics.

  10. Save and close the file. For an example of a complete biConfig.xml file, see Sample biConfig.xml file for IBM Digital Analytics.

  11. Restart test servers.


Next topic: Selecting the store function to enable IBM Product Recommendations e-Marketing Spots