Skip to main content
All CollectionsSilktide AnalyticsAnalytics FAQ
How does Silktide detect downloads?
How does Silktide detect downloads?
Jessica Chambers avatar
Written by Jessica Chambers
Updated over a year ago

Silktide automatically detects the majority of downloads automatically. Most analytics solutions require some configuration, but we automatically do this by default.

However there is no perfect way to guarantee downloads are recorded, so it is worth understanding our approach, and how you might extend it if necessary for your website.

What JavaScript analytics cannot do

When a visitor views a PDF, or Word document, or any non-HTML content in their browser, no JavaScript is run on the page. This means all JavaScript-based analytics – including Silktide Analytics, Google Analytics, and more – cannot count these downloads directly.

In fact the only way to record those visits directly is by being the web server itself, and most web servers don’t have their own mechanism to record this (or a mechanism to present this data if they do).

This doesn’t prevent Silktide from counting downloads, but it does force us to use another approach which is not guaranteed to be as accurate.

What Silktide Analytics does to measure downloads

Silktide detects when a user clicks on a link that points to a downloadable file, e.g. a PDF document.

Specifically, Silktide looks at the URL of every link that a user clicks on, and checks if that URL has a known file extension such as .pdf, .docx, .xlsx and so on (the precise list of file extensions can be found and configured, under Settings > Advanced).

If a known file extension is found, Silktide records a download of that link.

Limitations of this approach

Silktide is recording when someone clicks on a link to download a file, not recording the file itself being loaded (because the latter is impossible).

Because of this, it is possible to miss some downloads:

  1. Users may click on a link once, and view the file multiple times

  2. Users may visit a file from an external source, e.g. a link in an email, or from another website

  3. Users may visit a file from a search engine, like Google

  4. Users may visit files which don’t use a file extension

These limitations are present in all JavaScript-based analytics solutions, because of the way the web works.

In the case of #4, if your downloads don’t use a predictable file-extension, you should consider using our API to record your own download events.

Did this answer your question?