Conversion parameters let you collect additional information together with a conversion, such as a product category, the quantity purchased, or another attribute of the recorded action. You can use them in conversion goals to enrich the collected data and, for supported parameter types, analyze them in reports.
Every goal already includes the value parameter, which is used to record the monetary value of the conversion. Create a custom parameter when you want to collect additional information.
Create a conversion parameter
Go to Journey Lab > Web tracking > Conversion parameters.
Here you can view the available parameters and check their type, creation and last modified dates, and whether they are available in reports.
Select Add parameter and configure:
- Internal name: the name used to identify the parameter in magnews.
- Parameter ID: the identifier used to pass the parameter together with the conversion.
- Parameter type: defines how magnews interprets the collected value.
The Parameter ID is the identifier used in client-side goal scripts. If you change the ID of a parameter that is already in use, existing scripts will continue to record conversions, but the parameter value will no longer be collected until the scripts are updated with the new ID.
Choose the parameter type
The type determines which values you can record and how they must be passed to magnews.
You can choose from:
- Integer: for numeric values without decimals, such as a quantity.
- Decimal number: for numeric values with decimals, such as a weight or an amount.
- Text: for a text string.
- List of values: for a value selected from a predefined set, such as a category or brand.
- Structured: for more complex information organized in a structured object.
If you select List of values, enter the allowed values, one per line.
For numeric types and Lists of values, you can enable Include in reports to make the parameter available in conversion goal reports.
Use parameters in client-side goals
In a client-side goal, add the parameters you want to collect to the goal. magnews includes them in the tracking code generated for the goal.
When implementing the script on your website, assign each parameter the value associated with the conversion being recorded.
The value syntax varies depending on the parameter type. For example:
mna('conversion', {
'goal': 'purchase',
'value': '1000.50',
'quantity': 2,
'weight': 17.5,
'category': 'shoes',
'products': [{name: 'Shirt'}, {name: 'Shoes'}]
});In questo esempio:
-
quantityis an Integer. -
weightis a Decimal number. -
categorycan be either a Text or List of values parameter. For a List of values, the value must match one of the values configured for the parameter. -
productsis a Structured parameter.
As stated in the article on client-side goals: purchase is the ID of the client-side goal, and value is the parameter that specifies the conversion value, which is already available and therefore does not need to be created.
The name used in the script must match the Parameter ID configured in magnews.
Use parameters in server-side goals
With server-side goals, you do not need to add parameters to a script.
Instead, in the goal's Parameters tab, associate each parameter with a data table field. magnews uses the value stored in that field when recording the conversion.
For example, if your orders table contains a product category field, you can associate it with the Category parameter and use that information when analyzing conversions.
When to use a custom parameter
Create a parameter when you need additional information to distinguish between conversions or analyze them in more detail. For example, you can record:
- The brand or product category.
- The quantity purchased.
- A type of service or request.
- An order or conversion attribute.
- A set of structured information related to the action.
If you only need to record the monetary value of the conversion, you do not need to create a dedicated parameter: use the value parameter already available for the goal.