Exclude filetypes in "Matomo Configuration" variable

Hi,

is it possible to exclude special file types from being tracked as downloads when using the Tag Manager and Matomo Configuration variable?

I did it with this snippet before, but there is not option to provide filetypes within the Matomo Configuration variable…

_paq.push(['removeDownloadExtensions', "png|jpg|jpeg|gif|mp4"]);

Thanks! Toby

Hi @Toby

I think you can put your code in an HMTL tag on pageview event (with more priority than page view tag).
If this doesn’t work, maybe try to access the Tracker object: Matomo.getTracker( trackerUrl, siteId ) then:

  • addDownloadExtensions( string | array ) - Specify additional file extensions to be recognized as downloads. Example: ‘doc’ or [‘doc’, ‘xls’]
  • removeDownloadExtensions( string | array ) - Specify file extensions to be removed from the list of download file extensions. Example: ‘doc’ or [‘doc’, ‘xls’]

https://developer.matomo.org/api-reference/tracking-javascript

For more information, you can also have a look at:

https://developer.matomo.org/guides/tracking-javascript-guide#recording-a-click-as-a-download