By default, 10% of all tracked events store information about the page performance. It is possible to customize it by adding a custom tag in the Tag Manager.
To increase the sample to 15% for example, follow these steps:
- Open Piwik PRO.
- Navigate to Menu > Tag Manager.
- Click + Create new tag.
- Name the tag.
- Select Custom code (async) tag (custom asynchronous tag) and click Save.
- Paste the following code:
<script> var _paq = _paq || []; _paq.push(['setTimingDataSamplingOnPageLoad', 15]); </script>
Note: In this code, you can change the number
15
to a different number to have a smaller or bigger sample. If you use15
it means that 15% of the all tracked events will be measured to track the performance of pages. - Click + Existing trigger.
- Pick the All page views trigger.
- Click Save.
- Click Publish.
If you increase the sample to a much greater value than 15%, it will increase the number of tracking requests significantly and may cause performance problems in the tracking.