(Developer)

Add multiple analytics providers to the biConfig.xml file

Add multiple analytics providers to the store by updating the <biproviders> element in your biConfig.xml configuration file. Indicate the storeId and the analytics provider you would like to use for that store. To save time, we can also indicate a default analytics provider by updating the <defaults> element.


Task info

We can complete this task at the same time we are integrating an external analytics provider, or after the provider is already integrated.

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.

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 the staging or production environment.

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


Procedure

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

    workspace_dir/WC/xml/config/bi/biConfig.xml

  2. Update your biConfig.xml configuration file to reflect the analytics providers we want to use in the <biproviders> element. See the sample biConfig.xml configuration file in the following example.

  3. Save your file.

  4. Optional: We can override the default values for the <output> element to use the configuration for a specific provider. To specify the output section configuration to use for overriding the default values, you need to update the tag configuration in the CommonJSToInclude.jspf file for our store. For example, to update the <cm:output /> tag, locate the following code.

      <flow:ifEnabled feature="Analytics">
      	<%-- The CM header tag must be in the <head> tag of the JSP --%>
      	<cm:output section="header" />
      </flow:ifEnabled>

    Update the tag to identify the analytics provider to use by including the analytics provider name:

      <flow:ifEnabled feature="Analytics">
      	<%-- The CM header tag must be in the <head> tag of the JSP --%>
      	<cm:output section="header" biprovider="analytics_provider" />
      </flow:ifEnabled>

    Where analytics_provider is the name of the analytics provider to use.


Example

The following sample biConfig.xml configuration file has two analytics providers configured: coremetrics and additionalprovider.


Next topic: Specifying multiple analytics providers in store page analytics tags