3rd party integrations
...
Tracking Services
Matomo / Matomo Tag Manager
30 min
summary official websites site url website https //matomo org/ documentation pxp implements two options that can be implemented on the web these are via matomo javascript tracking client https //developer matomo org/guides/tracking javascript guide via matomo tag manager https //developer matomo org/guides/tagmanager/introduction matomo help centre https //matomo org/help/ developer integrations platform url android https //github com/matomo org/matomo sdk android ios https //github com/matomo org/matomo sdk ios web https //developer matomo org/guides/tracking introduction pxp implements two options that can be implemented on the web these are via matomo javascript tracking client via matomo tag manager ( ) ( ) available since pxp 3 8 0 ( ( ) ) available since pxp 3 8 2 tracking service event support matrix overview of the supported events and their configuration templates parameter actions actions category action name value category action name value not supported not supported (native apps) supported supported (web) views views path path name name title title not supported not supported (native apps) supported supported (web) purchases purchases category action name value product name product category category action name value product name product category not supported not supported attributes attributes id id not supported not supported ( ) ( ) purchases purchases contains special handling regarding tracking behavior more detailed information can be found below in the description of the event configuration for actions and views ( ( ) ) purchases purchases are supported for native apps only ( ( ) ) the name name template is used by matomo tag manager only general structure in tracking config json tracking service key name in " tracking config json " is " matomo matomo " general structure { "matomo" { "eventsenabledbydefault" true, "viewsenabledbydefault" true, "purchasesenabledbydefault" true, "attributesenabledbydefault" true, "events" { // your configured list of events }, "views" { // your configured list of events }, "purchases" { // your configured list of events }, "attributes" { // your configured list of attributes } } } event configuration custom dimensions matomo supports custom dimensions custom dimensions are distinguished into two different types "visit dimensions" used for purple attributes and "action dimensions" used by action and view events actions matomo supports action events action event "action event key" { "templates" { "trigger" "the name of the trigger in matomo tag manager", "category" "value of template", "action" "value of template", "name" "value of template", "value" "value of template" }, "parameters" { "parameter key 1" "value of parameter", // your configured list of parameters (supported via web only) } } example "issue downloaded" { "templates" { "category" "app", "action" "issue downloaded", "name" "{{issue name}}", "value" "1" } } example with parameters "issue downloaded" { "templates" { "action" "issue downloaded {{issue name}}", "category" "epaper", "label" "issue downloaded" }, "parameters" { "1" "{{issue id}}" // assuming that a custom visit dimension is configured as "issue id" at matomo and has this id of "1" } } templates template key required template value trigger trigger no the name of the trigger in matomo tag manager category category yes yes the category of the event action action yes yes the action of the event name name no the name of the event value value no must be value that can be parsed as floating point number parameters matomo supports parameters for action events in web only parameters must be configured as custom action dimension at matomo pameter name template value the id of the custom action dimension must be a value that can be parsed as integer number the value of the parameter views matomo supports view events depending on the platform used, the configuration differs as follows native purple app view event "view event key" { "templates" { "path" "value of template", "title" "value of template" } } example 1 "storefront feed" { "templates" { "path" "/storefront/feed", "title" "app/feed" } } example 2 "app menu" { "templates" { "path" "/app menu", "title" "app/menu" } } templates template key required template value path path yes yes must be a path like in a website or a full valid url title title yes yes the title of the page web integration for web integration, the path template is omitted because matomo sets this value automatically view event "view event key" { "templates" { "trigger" "the name of the trigger in matomo tag manager", "name" "value of template", "title" "value of template" }, "parameters" { "parameter key 1" "value of parameter", // your configured list of parameters (supported via web only) } } example javascript tracking client "storefront feed" { "templates" { "title" "app/feed" } } example matomo tag manager "app menu" { "templates" { "name" "app menu", "title" "app/menu" } } templates template key required template value trigger trigger no the name of the trigger in matomo tag manager name name no the name of the view used by matomo tag manager only title title no the title of the page this value overrides the default value how the default value is created titles for content on the web are generated using a complex algorithm involving several preprocessing software components this results in the title tag within the html document matomo in web uses its value as page title parameters matomo supports parameters for view events in web only parameters must be configured as custom action dimension at matomo pameter name template value the id of the custom action dimension must be a value that can be parsed as integer number the value of the parameter purchases matomo supports purchase events in native apps only purchase event "purchase event key" { "templates" { "category" "value of template", "action" "value of template", "name" "value of template", "product name" "value of template", "product category" "value of template" } } example "storefront issue purchased" { "templates" { "category" "storefront", "action" "issue purchased", "name" "{{issue name}}", "product name" "{{product id}}", "product category" "single purchase" } } templates matomo offers a specific api to track purchases tracking purchase events takes place in two steps an event is sent with the value of the price an additional order item is tracked (1) templates used for the event template key required template value category category yes yes the category of the event action action yes yes the action of the event name name no the name of the event (2) templates used for the order item template key required template value product name product name no the name of the product product category product category no the category of the product the order item is sent with some additional values api value productid productid the product id of the purchase price price the price of the product transactionid transactionid the transaction id of the purchase if available quantity quantity 1 attributes matomo supports attributes via custom dimensions custom dimensions are distinguished into two different types "visit dimensions" and "action dimensions" purple attributes correspond to the "visit dimensions" for more information please read the matomo documentation attribute "attribute key" { "templates" { "id" "value of template" } } example "has active subscription" { "templates" { "id" "1" } } templates template key required template value id id yes yes the id of the custom visit dimension must be a value that can be parsed as integer number additional supported functionality custom user id https //matomo org/faq/reports/set up user id tracking in matomo/ this feature is not not fully enabled as provided by matomo purple sets the user id in native apps only the generated purple device id is used for this url whitelisting https //matomo org/faq/how to/faq 21077/ matomo offers the possibility to create a whitelist of urls this ensures that only events whose url matches one of the whitelist urls are recorded if you want to send data from both your native apps and your website to the same matomo site and also want to enable the whitelist feature, please read on here how to enable the whitelist feature in matomo docid\ u qv254gvcz zax1ukxav how to configure native purple app any native tracking service is configured in the purple manager purple manager enable sdk settings location " your app your app " => " consent/push/analytics consent/push/analytics " => " analytics (general/ios/android/web) analytics (general/ios/android/web) " setting description enable matomo to enable the matomo sdk in your app, activate this checkbox matomo url the matomo url provided by matomo matomo site id the matomo site id provided by matomo apple privacy / att settings location " your app your app " => " consent/push/analytics consent/push/analytics " => " privacy privacy " consent management settings location " your app your app " => " consent/push/analytics consent/push/analytics " => " consent management consent management " setting description vendor id for matomo the vendor id is provided by the consent management platform web integration enable sdk you can use the purple experience builder to edit the " experience config json " matomo is not explicitly enabled if a valid configuration of matomo is present in the " experience config json ", the sdk is integrated into the html document this can be either done as matomo javascript tracking client or as matomo tag manager the corresponding configurations differ as follows structure in experience config json matomo javascript tracking client { "purple" { "analytics" { "matomo" { "configuration" { "siteid" "provided by matomo", "endpointurl" "provided by matomo", "scriptsourceurl" "provided by matomo" } } } } } matomo tag manager { "purple" { "analytics" { "matomo" { "configuration" { "usetagmanager" "provided by matomo", "containersourceurl" "provided by matomo" } } } } } matomo javascript client setting description siteid the id of your site in matomo endpointurl the endpoint url of your matomo project scriptsourceurl the script source url of your matomo project matomo tag manager setting description usetagmanager enables the matomo tag manager instead of matomo javascript client containersourceurl the url of your matomo container when using the matomo tag manager a further setup at matomo tag manager dashboard is needed please read on more here matomo tag manager setup guide docid\ rbdqewiczw3sxfpdaadqp consent management if you use one of the cmps supported by purple, you must specify the cmp specific vendor id for matomo, which you can get from your cmp frontend additionally, the iab vendor id for matomo can also be added structure in experience config json javascript tracking client with consent { "purple" { "analytics" { "matomo" { "configuration" { "siteid" "provided by matomo", "endpointurl" "provided by matomo", "scriptsourceurl" "provided by matomo" }, "consent" { "vendorid" "provided by your cmp", "iabvendorid" "" } } } } } tag manager with consent { "purple" { "analytics" { "matomo" { "configuration" { "usetagmanager" "provided by matomo", "containersourceurl" "provided by matomo" } "consent" { "vendorid" "provided by your cmp", "iabvendorid" "" } } } } } consent setting description vendorid the vendor id managed by your cmp iabvendorid the vendor id managed by iab