How do I delete an already taken heatmap screenshot?
You can delete an already taken screenshot of a heatmap by navigating to a heatmap and scrolling to the bottom of the page. If the heatmap is still active and you have at least write access, then you will be able to delete the screenshot.
The screenshot will be retaken in the near future as soon as a visitor views the page again.
If the heatmap is no longer active, it is not possible to delete the screenshot because the screenshot would not be retaken, unless you use the following methods.
API method
Use the API method HeatmapSessionRecording.deleteHeatmapScreenshot with your Matomo site ID (idSite) where the heatmap is saved and the ID of the heatmap you want to delete (idSiteHsr). Include a valid Matomo authentication token with permission to delete the heatmap. For example:
?module=API&method=HeatmapSessionRecording.deleteHeatmapScreenshot&idSite=1&idSiteHsr=5&format=json&token_auth=your_token
Console command
For Matomo On-Premise, you can also use the console command with your Matomo site ID (idSite) and the heatmap ID (idHeatmap). For example:
./console heatmapsessionrecording:remove-heatmap-screenshot --idsite={idsite} --idheatmap={idHeatmap}
The console command can also be used to retake the screenshot of an already finished heatmap. In this case, the heatmap will be temporarily restarted and up to 50 new samples will be taken so a screenshot can be taken. Then the heatmap will end automatically.