For the complete documentation index, see llms.txt. This page is also available as Markdown.

Monitor data ingestion

Track events through each step of the ingestion pipeline to localise where they are lost.

Your goal

Know how many events reach each step of the ingestion pipeline, so that when data goes missing you can say where it went missing rather than guessing.

Expected outcome

A report you can run per datamart and per step, and a habit of checking it after every change to tracking, rules, analyzers, or privacy configuration.

Why the steps matter

When activities are collected, the platform tracks the number of events that go through each step of the data pipeline. A gap between two consecutive steps localises the problem immediately.

Step
What it measures

JS_TAG

Events sent by the mediarithmics JavaScript tag.

API

Events sent through the ingestion API, api.mediarithmics.com/v1/datamarts/{datamart_id}/user_activities.

DOCUMENT_IMPORT

Events sent through USER_ACTIVITY imports with the document import feature.

EVENT_RULES

Events that match configured rules.

ACTIVITY_ANALYZER

Events that pass through activity analyzer plugins.

DOCUMENT_STORE

Events that are stored in the platform.

DOCUMENT_STORE is the number that matters for "did my data arrive". The steps before it tell you why it does not match what you sent.

Metrics and dimensions

Metric
What it counts

event_count

The events processed, including those in error.

error_count

The events rejected.

Events correctly processed = event_count - error_count.

The dimensions you need most:

Dimension
What it groups or filters by

pipeline_step

The ingestion step, from the steps above.

datamart_id

The datamart the event is linked to.

organisation_id

The organisation the event is linked to.

community_id

The community the event is linked to.

date_yyyy_mm_dd, date_yyyy_mm_dd_hh, date_yyyy_mm_dd_hh_mm

The date the event was processed at a step, by day, hour, or minute.

event_name

The name of the event.

channel_id

The channel the event was sent on.

Read the report

1

Open the Query Tool

Go to Data Studio > Query Tool.

2

Select the data source

In the selector above the query builder, which shows OTQL by default, choose Data ingestion. See Choose a data source.

3

Pick a metric and a dimension

In Select, choose event_count or error_count. In by, choose pipeline_step to get the funnel above.

4

Set the period

In for, choose the period to analyse. It defaults to Last 7 days. Statistics older than the retention period are not kept.

5

Filter the report

Optional. Click Add a filter, choose a dimension in Filter on, and the value it equals - a datamart_id when your organisation has several datamarts.

6

Run the report

Click Run. Use New Value to add a metric, such as error_count beside event_count, and New series to compare another request in the same tab.

The ingestion monitoring endpoint is a mediarithmics data cube, and works like the activities analytics API.

Field
Type
Description

metrics

Array

The metrics to retrieve. Required.

dimensions

Array

The dimensions to group metrics by. Required.

dimension_filter_clauses

Object

Filters applied on dimensions before calculating the metric.

date_ranges

Array

The periods to analyse - each with a start_date and an end_date.

Group by pipeline_step to get the funnel above. Add datamart_id when your organisation has several.

The full request and response, and the operations that list the available metrics and dimensions, are in the Platform Monitoring API reference.

Retention

These aggregated statistics are kept for 3 months.

A shorter window than collection volumes or usage reports, so a year-on-year comparison of ingestion is not possible from this API - extract it if you need one. See Data retention.

Diagnosing a gap

Gap
Likely cause

Nothing at JS_TAG

The tag is not firing, the site token is wrong, or consent is never granted. See Web tracking.

Nothing at API

Authentication, or the payload is rejected. See Server-side events.

EVENT_RULES at zero when you expect matches

The rule does not match - a $page_view-only rule applied to differently named events, for instance. See Event rules.

ACTIVITY_ANALYZER well below the step before

The analyzer is failing or timing out. See Build an activity analyzer.

DOCUMENT_STORE well below ACTIVITY_ANALYZER

The analyzer is removing activities, or a privacy wall is dropping them because the users have no compatible choice. See Manage consent & Processing activities.

Everything looks right but queries return nothing

The data arrived but is not indexed - a schema problem, not an ingestion problem. See Monitor collection volume.

When to check it

  • After deploying or changing the tag.

  • After creating or editing an event rule or an activity analyzer.

  • Before and after enforcing a privacy wall.

  • After a schema publication, together with collection volumes.

  • On a schedule, so a slow decline is visible before someone reports it.

Last updated

Was this helpful?