Action parameters
To inject query params when an action is triggered define the actionParameters option as an object where each key defines an action and the value the corresponding parameter to inject.
Supported action keys are defined by the following values:
- chatLink, when redirecting to a link included in a chat message.
- addToCart, when a product is added to the cart by a custom resolved URL.
- cartCheckout, when redirecting to the checkout URL.
- shopInStore, when redirecting to the store product page.
- promotionalBanner, when redirecting to a promotional banner URL.
- showMe, when redirecting to a show me call to action URL.
- download, when redirecting to a download call to action URL.`
Any value can be used to define the query parameter to inject when an action is triggered. The most generic form is to define the query param with an object as follows for the action shopInStore.
{
"shopInStore": {
"key": "the_query_parameter_key",
"value": "the_query_parameter_value"
}
}
If the query param is not defined as an object or the key is not included the definition then the action key is used instead (shopInStore in the above example).
IMPORTANT: Defined action parameters are always injected despite if they match or not the propagation parameters regex, and it's not required to define all the actions as in the fallowing example.
{
"chatLink": {
"key": "utm_content",
"value": "Click_On_Live_Chat"
},
"shopInStore": {
"key": "utm_content",
"value": "Click_Product_On_Live"
}
}
Action parameters concatenation
IMPORTANT NOTE: When using propagationParameters some query parameters might match both the propagation regex and a key of an action parameter. To avoid values override use joinParamsPropagation to concat both action parameters and the parameters matching the propagation regex.
If the joinParamsPropagation is not defined then the action parameters replace the ones existing in the URL where they are injected unless the option join is present in the action parameter definition.
{
"shopInStore": {
"key": "utm_content",
"value": "Click_Product_On_Live",
"join": "-"
}
}
The join option is used to concatenate the present value and the one to be injected. With the above example definition, if the query parameter utm_content already exists with value Product_Campaign in the URL where the action parameter is being injected then the resulted value after injection will be Product_Campaign-Click_Product_On_Live.