Passing extra data to IBM Digital Analytics with the extraparms parameter

You might want to pass more data to IBM Digital Analytics that is not collected automatically by the WebSphere Commerce analytics tags. For example, we can pass information about the brand of the products customers view for a IBM Digital Analytics explore report, or pass specific registration data for a custom report in IBM Digital Analytics. If so, use the extraparms parameter in the WebSphere Commerce analytics tag when you place the tag in the store page. We can also use the extraparms parameter to override the category ID that the WebSphere Commerce analytics tag generates. Many of the WebSphere Commerce analytics tags support the extraparms parameter.

Note: This information also applies to the orderExtraparms and extraparmsMap parameters that are supported by some WebSphere Commerce analytics tags. For more information about passing values with the orderExtraparms parameter, see the section 3. Format for setting extraparms values for other WebSphere Commerce analytics tags.


How the extraparms parameter passes data to IBM Digital Analytics

At run time, the WebSphere Commerce analytics tags generate IBM Digital Analytics data tags. If you include the extraparms parameter in the WebSphere Commerce analytics tag, its values are passed as a string to one or more of the following IBM Digital Analytics data tag parameters, depending on how you specify the values:

Parameter in the generated IBM Digital Analytics data tag Description
catIDoverride Use this parameter to explicitly override the category ID generated by the following WebSphere Commerce analytics tags: <cm:cart />, <cm:order />, and <cm:product /> tag.
attributes This parameter provides Explore attributes to IBM Digital Analytics Explore, an ad hoc reporting solution we use to build custom reports.
extraFields This parameter provides more data for custom reports in IBM Digital Analytics.
cm_vc This parameter is the "virtual category" parameter, used only for the <cm:product /> tag. Use this parameter to categorize product views that originate from special links, such as cross-sell recommendations, rather than from the normal category navigation.

The format that we use to pass extraparms values differs depending on the WebSphere Commerce analytics tag. Format rules are provided in the following three sections:

Note: The examples in this topic use the simplified syntax for specifying extraparms values. We must specify the values using properly escaped JavaScript:

If any of your extraparms values are JavaScript variables, see the syntax rules explained in Syntax for passing JavaScript variables as extra parameters.


1. Format for setting extraparms values for the <cm:cart /> and <cm:order /> tags

When you set the extraparms values for either of these tags, we must follow a specific format to control which values are passed to the catIDoverride parameter, the attributes parameter, and the extraFields parameter. The following example illustrates the correct format:

The format rules are:

The following examples show how to apply these format rules when using the extraparms parameter. The examples use the <cm:cart tag />, but they apply to the <cm:order /> tag as well.


2. Format for setting extraparms values for the <cm:product /> tag

When you set the extraparms values for the <cm:product /> tag, we must follow a specific format to control which values are passed to the catIDoverride parameter, the attributes parameter, and the cm_vc parameter. The following example illustrates the correct format:

The format rules are:

The following examples show how to apply these format rules when using the extraparms parameter with the <cm:product /> tag:


3. Format for setting extraparms values for other WebSphere Commerce analytics tags

The following format rules and examples apply to the <pageview /> tag, and to any other WebSphere Commerce analytics tags that pass values to the IBM Digital Analytics attributes and extraFields parameters. When you set the extraparms values for these tags, we must follow a specific format to control which values are passed to the attributes parameter, the extraFields parameter, or both. The following example illustrates the correct format:

The format rules are:

The following examples show how to apply these format rules. The examples use the <cm:pageview /> tag, but they also apply to other tags that pass values to attributes and extraFields.


Related reference
Use the page view tag with IBM Digital Analytics
Use the product tag with IBM Digital Analytics