Activities analytics
Data coming into your datamart is stored in a multi-model database, optimizing it for different usages. To display performance analytics for elements like session duration, conversions, and funnel, the platform duplicates some user activities and information and optimizes them.
For that purpose, it is important that you use predefined event names and properties when possible. Custom events won't be taken into account when calculating metrics. For example, don't create order
events when tracking an e-commerce site, but the predefined $transaction_confirmed
event. $transaction_confirmed
events are used when calculating conversions and amounts but not order
events.
Here is a sample event that can be used in analytics:
The list of predefined events that are used in analytics are as follows.
Event name | Usage | Important properties |
$transaction_confirmed | Home dashboards (E-Commerce Engagement) Segment dashboards (E-Commerce Engagement) Funnel Analytics |
|
$item_view | Funnel Analytics |
|
$basket_view | Funnel Analytics |
|
Activities analytics data retention
Activities analytics data is kept 4 month in order to optimize performances.
Transforming important events into your custom events
While it is better to use predefined events when possible, it isn't always the best solution for you. To keep having analytics correctly stored, you can transform your custom events to predefined ones.
Only events coming into the datamart after an event transformation has been defined will be transformed.
Those transformations don't transform user activities and events anywhere else. You should use activity analyzers to transform them everywhere.
Event transformations
An event transformation is linked to a datamart. Here is a sample transformation:
Property | Type | Description |
datamart_id | Integer | The ID of the datamart where the transformation is applied |
channel_id | Integer | The ID of the channel where the transformation is applied |
source_event_name | String | The name of your custom event you wish to transform into a predefined event |
target_event_name | String | The name of the predefined event it is transformed into. Allowed values are :
To learn about predefined events, see Predefined event names |
mapping_id | Integer | The ID of the Property mapping to apply when transforming the event |
Property mappings
Event transformations use property mappings to choose which property in your custom event becomes which property in the predefined event.
Here is a sample property mapping to start with for $transaction_confirmed
events.
Map events JSON as it is stored in the database and visible in user's timelines (post activity analyzers).
Get existing transformations
GET
https://api.mediarithmics.com/v1/datamarts/:datamartId/analytics_event_transformation
Path Parameters
Name | Type | Description |
---|---|---|
datamartId | integer | The datamart ID |
Create an event transformation
POST
https://api.mediarithmics.com/v1/datamarts/:datamartId/analytics_event_transformation
Path Parameters
Name | Type | Description |
---|---|---|
datamartId | integer | The datamart ID |
Request Body
Name | Type | Description |
---|---|---|
Body | string | The event transformation object |
Update an event transformation
PUT
https://api.mediarithmics.com/v1/datamarts/:datamartId/analytics_event_transformation/:transformationId
Path Parameters
Name | Type | Description |
---|---|---|
transformationId | integer | The transformation ID |
datamartId | integer | The datamart ID |
Request Body
Name | Type | Description |
---|---|---|
Body | string | The event transformation object |
Remove an event transformation
DELETE
https://api.mediarithmics.com/v1/datamarts/:datamartId/analytics_event_transformation/:transformationId
Path Parameters
Name | Type | Description |
---|---|---|
transformationId | integer | The transformation ID |
datamartId | integer | The datamart ID |
Get property mappings
GET
https://api.mediarithmics.com/v1/datamarts/:datamartId/analytics_mapping
Path Parameters
Name | Type | Description |
---|---|---|
datamartId | integer | The datamart ID |
Create property mappings
POST
https://api.mediarithmics.com/v1/datamarts/:datamartId/analytics_mapping
Path Parameters
Name | Type | Description |
---|---|---|
datamartId | integer | The datamart ID |
Request Body
Name | Type | Description |
---|---|---|
Body | object | The property mapping object |
Delete property mappings
DELETE
https://api.mediarithmics.com/v1/datamarts/:datamartId/analytics_mapping/:mappingId
Path Parameters
Name | Type | Description |
---|---|---|
mappingId | integer | The mapping ID |
datamartId | integer | The datamart ID |
Last updated