Skip to content

Matomo Integration

Cheton Wu edited this page Jan 6, 2023 · 2 revisions

Getting Started

TBD

Set Up Your Site

TBD

Appendix

Query Results using Azure Data Explorer

Summary

xdr_matomo_events(startofday(ago(7d)), startofday(now()))
| where idsite == 39
| where server_time >= startofday(ago(7d))
| where server_time < startofday(now())
| summarize count() by startofday(server_time)

Pageview (w/ outlinks)

xdr_matomo_events(startofday(ago(7d)), startofday(now()))
| where idsite == 39
| where not (custom_url == "" and outlink_url == "")
| project server_time, custom_url, outlink_url

Tracking Events

// Tracking Events
xdr_matomo_events(startofday(ago(7d)), startofday(now()))
| where idsite == 39
| where isempty(custom_url)
| where isempty(outlink_url)
| extend x = event_name
| extend x = replace_string(x, '&quot;', '"')
| extend x = replace_string(x, '&gt;', '>')
| extend event_name = parse_json(x)
| order by server_time, idvisitor
| project server_time, idvisitor, event_category, event_action, event_name, event_name['path'], event_name['title'], custom_dimension_1
Clone this wiki locally