Skip to main content

Matomo

This page is a concise, inference-based reference for the Matomo-compatible /matomo.php requests currently parsed by d8a.

Method

GET or POST

POST may also send a batch body like:

{"requests":["?idsite=1&url=https%3A%2F%2Fexample.com", "?idsite=1&e_c=Video&e_a=Play"]}

URL

Common endpoint:

  • /matomo.php

Event type inference

The tracker payload is interpreted in this order:

ConditionMapped event name
idgoal=0 and ec_id presentecommerce_order
idgoal presentgoal_conversion
ma_id present and ma_mt=videovideo_play
download presentdownload
link presentoutlink
search param present, even if emptysite_search
c_i presentcontent_interaction
c_n presentcontent_impression
e_c and e_a presentevent
otherwisepage_view

Query parameters

Core identity and routing

ParameterProbably mapped toNotes
idsitesite ID / property IDRequired for routing in d8a.
_idclient IDPrimary client identifier when present.
cidclient ID fallbackUsed only if _id is absent.
uiduser IDExplicit user identifier.
_idnreturning-user flag0 means returning user; other/missing values behave like non-returning.
langdevice languageFallback may also come from Accept-Language.

Page and navigation

ParameterProbably mapped toNotes
urlpage locationAlso the source for nested utm_* and click IDs.
action_namepage titleUsed on page views and other page-scoped hits.
urlrefpage referrerEmpty string likely means direct / no referrer.
ignore_referrerignore-referrer flagAlias: ignore_referer. 1 means true.
pv_idpage view IDKept as a string.

Events, goals, search, and content

ParameterProbably mapped toNotes
e_cevent categoryWith e_a, makes an event.
e_aevent actionWith e_c, makes an event.
e_vevent valueNumeric.
idgoalgoal IDAny value makes goal_conversion unless ecommerce-order rule wins.
linkoutbound link URLMakes outlink.
downloaddownload URLMakes download.
searchsite-search keywordPresence alone makes site_search.
search_catsite-search categoryOptional.
search_countsite-search result countInteger.
c_icontent interaction nameMakes content_interaction.
c_ncontent nameMakes content_impression when c_i is absent.
c_pcontent pieceOptional companion to c_n / c_i.
c_tcontent targetOptional companion to c_n / c_i.
ma_idmedia asset IDOnly observed as part of video detection.
ma_mtmedia typevideo plus ma_id makes video_play.

Ecommerce and product detail

ParameterProbably mapped toNotes
ec_idecommerce order IDWith idgoal=0, treated as ecommerce_order.
revenuepurchase revenueGrand total.
ec_stsubtotalExcluding shipping.
ec_txtaxNumeric.
ec_shshippingNumeric.
ec_dtdiscountNumeric.
ec_itemsecommerce items arrayJSON array of item tuples.
_pksproduct SKUProduct-detail style hit.
_pknproduct nameProduct-detail style hit.
_pkpproduct priceNumeric.
_pkcproduct categoriesJSON array or single raw string.

ec_items is parsed as tuples in this shape:

[sku, name, category, price, quantity]

The category slot may be either a single string or an array of up to 5 category levels.

Custom data

ParameterProbably mapped toNotes
cvarevent custom variablesJSON object like {"1":["name","value"]}.
_cvarsession custom variablesSame JSON shape as cvar; merged across session.
dimensionNcustom dimension slot NExamples: dimension1, dimension2.

Marketing params carried inside url

These are not top-level Matomo query params in d8a. They are extracted from the page URL inside url.

Parameter in url queryProbably mapped to
utm_campaigncampaign
utm_sourcesource
utm_mediummedium
utm_contentcontent
utm_termterm
utm_idcampaign ID
utm_source_platformsource platform
utm_creative_formatcreative format
utm_marketing_tacticmarketing tactic
gclidGoogle click ID
dclidGoogle Display click ID
gbraidGoogle braid click ID
wbraidGoogle web braid click ID
fbclidMeta click ID
msclkidMicrosoft click ID
srsltidGoogle Shopping result click ID

Practical read

If you only need the useful mental model, the Matomo tracker mostly sends:

  • page context via url, action_name, urlref
  • identity via idsite, _id or cid, optionally uid
  • event semantics via e_*, link, download, search, idgoal, c_*
  • ecommerce via ec_* and product detail via _pk*
  • custom metadata via cvar, _cvar, and dimensionN