How do I exclude / ignore my traffic or specific users from being tracked in Matomo?
When testing or managing your website, you may want to exclude your own activity, or that of certain users or bots from being tracked in your Matomo reports. Matomo offers several methods to exclude specific traffic so that it doesn’t skew your analytics.
Exclusions only apply going forward. When you define traffic exclusions, Matomo does not apply the exclusion retroactively. Visits already tracked before setting exclusions will remain in your reports.
1. Exclude visits using an IP address or IP address range
Configure Matomo to ignore all traffic from a given IP address or IP address range or CIDR range (useful if you use one or more static IP addresses). Add the exclusion globally or at the website level in Matomo settings > Measurables (Websites) > Settings. See How to exclude traffic by IP address or IP range.
2. Exclude visits using an ignore cookie
Set a Matomo ignore cookie in your browser so your visits are not tracked in Matomo. This is useful if you frequently access your site from dynamic IPs or multiple locations. In your Matomo Personal Settings, click the link under Exclude your visits using a cookie. This sets a matomo_ignore
cookie with no expiry on your browser.
3. Exclude visits using an opt-out cookie
Include an opt-out option on your site, which allows any visitor, including yourself, to opt out of being tracked. The mtm_consent_removed
cookie is set in your browser to prevent Matomo from tracking. See How to add a tracking opt-out feature.
4. Exclude visits that don’t match your domain
Force Matomo to only track visits and Page URLs where the URL belongs to your website domain(s). If you’re running Matomo across environments (e.g. staging, QA, or test sites), you can configure it to only track visits to specific domains and prevent unintended tracking from non-production environments or other sites. See How do I force Matomo to only track Page URLs that belong to my website?
5. Exclude visits based on User-Agent
Filter out traffic based on the visitor’s User-Agent string, for example, to ignore internal tools, scripts, or bots using specific headers. See How do I exclude all requests with a specific User Agent from statistics?
6. Exclude visits using tracking code modifications
Alternatively, you can avoid tracking one or more users that meet specific criteria by implementing logic in JavaScript (or server-side) to hide the tracking code. When a user meets the criteria, they are excluded from tracking. Your custom code would ensure the JavaScript tracking code is not added to your pages or apps. When the tracking code is not output in the page for specific users, then they won’t be tracked.
Another approach to is to define specific requests to be excluded (advanced users only). See How do I exclude specific tracking requests in Matomo?
7. Use segments to exclude certain visitors from reports
Create a Segment and define your custom segment for your visits with conditions that exclude you. So you would track all visits in Matomo and then use Segments to further exclude visits, for example “Segment and show only visits where User ID
is not empty”, or “Segment and show only visits where my custom dimension user type
is not employee
” to exclude only employees with a custom segment based on a custom dimension.
8. Delete tracked data
If you’ve already recorded data that you now want to remove such as test visits, internal traffic, or specific user activity, you can delete individual visits or remove entries linked to a given user ID or visitor ID using the Matomo GDPR tools.
Important: Before deleting any part of a report, consider whether the data includes personal information. If so, ensure the deletion aligns with your organisation’s data retention policy and legal obligations. See How do I delete specific visits to clean-up some of the data?