I am using Matomo PHP tracker. When I go to Personal Settings and try to exclude my visits using a cookie, my PHP tracker does not honor the cookie and keeps tracking my visit. Do I need to make any function call in the PHP tracker to read the cookie and exclude my visits ? Can someone give me a sample code for that ?
As you are writing the PHP code, you can simply only execute the Matomo tracker if the IP is not yours:
if ($_SERVER['REMOTE_ADDR'] != "192.168.0.1") {
your_matomo_tracker()
}
Yes, that would work perfectly. Thanks.
1 Like