Disclaimer: this is a draft needing revision, no guarantees on correctness at this stage!
This article shall eventually cover the differences between the available ways of collecting visitor data with Matomo, to serve as an entry point to integrating Matomo in the way that matches your demands.
It is generally possible to use a mix of methods, but before you start implementing Matomo,
you might want to get familiar with eachs methods benefits and limitations.
Let’s start by taking a look at when the data collection takes place, depending on the tracking method:
This leads to different data being collected by the different methods, as displayed in below chart:
|Scope of data collection depending on Matomo tracking method||ServerLogs import||Matomo php-tracking||Matomo Img-tracking||Matomo JS-tracking||combined Matomo JS + Img tracking|
|Known crawlers (googlebot, FB-crawler etc)||optional
ignored by default
ignored by default
|Unknown crawlers / bots|
|Visits using AdBlocker|
|Visits with DNT enabled||optional||optional||optional||optional|
|Basic data from header request|
|Additional browser data from JS environment|
The large data collections of the Server Logging & php-tracking will give you better insight in the servers load situation and the kinds of unknown bot hits your website receives,
while the smaller but enriched data collection of the JS tracking will let you get a quicker picture of what the real visitors are doing on your site, and what kinds of devices they are using.
|Pros and Cons||ServerLogs import||Matomo php-tracking||Matomo Img-tracking||Matomo JS-tracking||combined Matomo JS + Img tracking|
|“Live” real-time reports in Matomo|
|Works with static html pages|
|Works with SinglePageApplications|
|Works in emails|
|Can trace on-interface interactions that do not trigger page navigation|
|Can evaluate content impressions/visibility in viewport on responsive sites|
|Can be easily configured in Matomo to meet EU data privacy standards|
|Can be enhanced with custom variables|
|Impact on perceived page load time||none||delay as php is executed||none||none||none|
|Added web traffic on first visit||none||none||~220 bytes (one request)||22kb compressed piwik.js + 2nd request to transfer data||22kb compressed piwik.js + 2nd request to transfer data|
|Easy to implement when tracking sites across several servers|
|Sets a Cookie|
|Track server error||
The discussion about this comparison can be found here: