This help page describes how to implement merchandising eVars. For information on how merchandising eVars work as a dimension, see eVars (Merchandising) in the Components user guide.
For a detailed discussion of how merchandising eVars work, see Merchandising eVars and product finding methods.
Before using eVars in your implementation, make sure you configure the eVar to the desired syntax in report suite settings. See Conversion variables in the Admin guide.
Failure to correctly configure merchandising eVars results in unexpected values or data loss for the variable. Make sure it is correctly configured for your implementation.
When ‘Product Syntax’ is enabled, the merchandising category is populated directly within the
products variable, so selecting and setting a binding event is not required. This is the recommended method and should be used unless the value is not available to set in
products when the success event takes place.
// The bare minimum to set a merchandising eVar with product syntax s.products = ";Example product;;;;eVar1=Example merchandising value"; // An example single product with product syntax s.products = "Example category;Example product;1;5.99;event1=1;eVar1=Turtles"; // Tie a merchandising eVar to a different values on two different products s.products = "Birds;Scarlet Macaw;1;4200;;eVar1=talking bird,Birds;Turtle dove;2;550;;eVar1=love birds";
The value for
eVar1 is assigned to the product. All subsequent success events that involve this product are credited to the eVar value.
Conversion Variable Syntax is used when the eVar value is not available to set in the
products variable. This scenario typically means that your page has no context of the merchandising channel or finding method. In these cases you set the merchandising variable before you arrive at the product page, and the value persists until the binding event occurs.
When the binding event selected during configuration occurs, the persisted value of the eVar is associated with the product. For example, if
prodView is specified as the binding event, the merchandising category is tied to the current product list only at the time the event occurs. Only subsequent binding events can update a merchandising eVar that has already been assigned to a product.
// Place on the same or previous page before the binding event: s.eVar1 = "Aviary"; // Place on the page where the binding event occurs: s.events = "prodView"; s.products = "Birds;Canary";
eVar1 is assigned to the product
"Canary". All subsequent success events that involve this product are credited to
"Canary". Additionally, the current value of the merchandising variable is tied to all subsequent products until one of the following conditions is met: