Event parameters and enrichment
Event parameters are additional pieces of information about a customer activity the event describes. For example, a page.visit
event can be described by parameters such as:
IP
(IP address from which a user visited the website)UTM source
(the UTM source from which a user was referred to the website)device
(the device from which a user accessed the website)- and more
For a product.buy
(an event that describes a purchase of a product) the list of parameters can be long and include:
name
(name of the product)finalUnitPrice
(the final price of the product)currency
(the currency of the product)quantity
(the quantity of a product)og:url
(a page address towards which all shares, likes, and so on, will be counted)- and more
Events and their parameters can be used to prepare analyses of various kinds, for example, users can create a metric that counts visits to particular subdomains or they can create an aggregate that calculates the value of abandoned cart for a specific customer.
Adding parameters to events
params
object) are saved to the database and added to the event’s definition automatically. By default, they are visible in analytics. In such a case, you don’t need to add the parameters according to the instructions in this article. If needed, you can edit the parameters to add names, descriptions, or enable event enrichment.- Go to Data Management > Events.
- In the list of events, find the event where you want to add parameters and hover over it.
- On the right side of the screen, click Add property.
- In the Source parameter field, enter the name of the parameter as it is sent by the SDKs/API.
- In the Property name field, enter a human-readable label for display in the Synerise portal.
- Optionally, in the Description field, you can add an explanation about the purpose of this parameter.
- From the Property type dropdown list, select the format of the property value as sent by the SDKs/API.
- If you want to enrich the event with data from a catalog, select the catalog from the Link to drop-down list.
- To complete the process, click Save.
Result: The property is saved on the list of Params manager.
Changing property visibility in analytics
By default, each parameter is visible in analytics.
You can enable or disable the visibility of a parameter in the analytics:
- In the list of events, find the event where the parameter is defined and hover over it.
- Next to the Add property button, click the downward arrow button.
Result: A list of parameters appears. - In the list of parameters, hover over the visibility icon of a parameter.
- Switch the toggle that appears.
Enriching events with data from catalogs
You can add data from catalogs to an event automatically. This can be used, for example, to automatically add product data to a product-related event without sending that data with the event every time.
The data is added to an event from a catalog when the value of the source parameter matches a value in the catalog’s key. The data of the object identified by that key is added to the event.
There is, however, an exception when the usage of the enriched event parameters is not recommended - while defining the trigger of an in-app message. In such case, you must use only the original parameters of the event which is selected as a trigger of the message display because the parameters that are added by enrichment are not handled.
Procedure
- Create a catalog.
- In the catalog, add entries. For example, in a catalog where a product SKU is the key, you can add the following product:
sku: 1845693 name: Soft drink brand: Drink company
- Add a property to the event in the following way:
- As the source parameter, enter the name of the parameter sent by the SDKs/API as the product SKU.
- In the Link to drop-down list, select the catalog that you want to retrieve data from when enriching events.
- Fill in the other parameters.
Example result
When you send an event using the SDKs/API that includes the enrichment parameter in the params
object, the data from the catalog is added to the event record.
For example, if you want to enrich page visit events with data about the item that the page presents, you can send the following event when that page is opened:
{
"action": "page.visit",
...
"params": {
"productSku": "1845693"
}
}
When you open that event in Synerise, the data from the catalog (see example catalog in step 2 of the procedure) is added automatically and the event looks like this:
{
"action": "page.visit",
...
"params": {
"productSku": "1845693",
"name": "Soft drink",
"brand": "Drink company"
}
}