How can I customize sampling for page timing reports?

Analytics

Piwik PRO by default uses 10% of all page views to record page performance data. However, you can change this if you want.

To increase the sample to 15%, follow these steps:

  1. Log in to Piwik PRO.
  2. Go to Menu > Tag Manager.
  3. Navigate to Tags.
  4. Click Add a tag.
  5. Name your tag.
  6. Name your tag and select the following type: Custom code (async).
  7. In Tag code, add the following code:
    <script>
        var _paq = _paq || [];
        _paq.push(['setTimingDataSamplingOnPageLoad', 15]);
    </script>

    Note: In this code, you can change 15 to a smaller or bigger sample. Just keep in mind that if you increase the sample size beyond 15%, there will be more tracking requests, which can cause some slowdown in tracking performance.

  8. Click Choose existing trigger
  9. Select All page views.
  10. Click Save.
  11. Click Publish
  12. All done!

Was this article helpful?

Technical support

If you still have any questions, visit our community.
There’s always someone happy to help!

Back to help center