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
$items
: list of products in the transaction
$items.$qty
: for the conversion amounts
$items.$price
: for the conversion amounts
$items.$id
: for the product IDs in funnel analytics
$items.$brand
: for the brand filter in funnel analytics
$items.$category1
, $items.$category2
, $items.$category3
and $items.$category4
: for the categorization in funnel analytics
$item_view
Funnel Analytics
$items
: contains only one product
$items.$price
: for the conversion amounts
$items.$id
: for the product IDs in funnel analytics
$items.$brand
: for the brand filter in funnel analytics
$items.$category1
, $items.$category2
, $items.$category3
and $items.$category4
: for the categorization in funnel analytics
$basket_view
Funnel Analytics
$items
: list of products in the basket
$items.$qty
: for the conversion amounts
$items.$price
: for the conversion amounts
$items.$id
: for the product IDs in funnel analytics
$items.$brand
: for the brand filter in funnel analytics
$items.$category1
, $items.$category2
, $items.$category3
and $items.$category4
: for the categorization in 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 :
$transaction_confirmed
$item_view
$basket_view
$list_item_view
mapping_id
Integer
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
datamartId
integer
The datamart ID
Create an event transformation
POST
https://api.mediarithmics.com/v1/datamarts/:datamartId/analytics_event_transformation
Path Parameters
datamartId
integer
The datamart ID
Request Body
Body
string
The event transformation object
Update an event transformation
PUT
https://api.mediarithmics.com/v1/datamarts/:datamartId/analytics_event_transformation/:transformationId
Path Parameters
transformationId
integer
The transformation ID
datamartId
integer
The datamart ID
Request Body
Body
string
The event transformation object
Remove an event transformation
DELETE
https://api.mediarithmics.com/v1/datamarts/:datamartId/analytics_event_transformation/:transformationId
Path Parameters
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
datamartId
integer
The datamart ID
Create property mappings
POST
https://api.mediarithmics.com/v1/datamarts/:datamartId/analytics_mapping
Path Parameters
datamartId
integer
The datamart ID
Request Body
Body
object
The property mapping object
Delete property mappings
DELETE
https://api.mediarithmics.com/v1/datamarts/:datamartId/analytics_mapping/:mappingId
Path Parameters
mappingId
integer
The mapping ID
datamartId
integer
The datamart ID
Last updated