Measuring Downloads of Anything You Distribute


September 7, 2021

This article was originally posted on


Back in March we first launched Scarf Gateway with support for Docker/OCI containers. No matter which registry your containers are hosted on, you can now host all of them through your own central endpoint, and have better visibility into that download traffic than any other registry on the market. All without ever having access to personally identifiable information or invading the privacy of your users.

Today, we've expanded the gateway's capabilities beyond serving containers, to support downloads for any kind of file. Whether you distribute archives like {% c-line %}.zip{% c-line-end %}, or  {% c-line %}.tar.gz{% c-line-end %}, text files like {% c-line %}JSON{% c-line-end %}, or even raw executables, they can now be served via Scarf, from anywhere on the internet. Your files can be anywhere - maybe you upload artifacts to GitHub Releases, or S3. Scarf sits right on top of whatever your workflow and stack might be, and augments it with advanced analytics you won't find on whatever site or tool you're using today.

A Quick Example

GitHub Releases is a common way to publish and distribute artifacts for your project. Unfortunately, it does not offer much in the way of observability into how your artifacts are downloaded, but that's exactly where Scarf can help. I'll give an example for one of my own personal packages, curl-runnings. On the releases page, curl-runnings distributes binaries for Mac and for Debian-flavored Linux, and until now, I didn't know much about its downloads.

An example download URL for one of these releases might look like:

Factoring in the different artifacts being distributed for each release, and the associated version numbers for each release, we have a URL template of the form:{version}/curl-runnings-{version}-{platform}.tar.gz

Scarf Gateway provides an easy way to map any new incoming URL template we'd like to this original URL template above for our release artifacts. I chose to use my own domain, {% c-line %}{% c-line-end %}, and pick a new incoming URL path {% c-line %}/curl-runnings-{version}-{platform}.tar.gz{% c-line-end %}. Now, a URL like:

Will resolve to:

The final step is using the new links anywhere these archives are linked and referenced. On GitHub Releases, this just means adding the new links in the release description.

Point users to your new Scarf-powered download links

When a user clicks the link and the download is initiated, Scarf will log a download with the variable values {% c-line %}version=0.16.0{% c-line-end %} and {% c-line %}platform=mac{% c-line-end %}. Histograms for all variables are available within the Scarf Dashboard.

Scarf automatically reports your downloads for all variables in your URL templates

With Scarf, curl-runnings has fully measurable and customizable download URLs!

Give it a Try

You can think of Scarf Gateway as a powerful, programmable link shortener with advanced analytics for anything you distribute for direct download. If you've ever wanted to measure which download links on your site were performing better, or which marketing campaign was converting most effectively into actual downloads of your software, you now have a new tool in your toolbox.

Scarf Gateway is free for all open-source projects. You can get started here, or head to the docs to learn more. We're excited to see what you build!

Latest blog posts

Tools and strategies modern teams need to help their companies grow.

Why Downloads are an Essential Metric for Open Source Software Projects

Why Downloads are an Essential Metric for Open Source Software Projects

If you're only going to track one thing for your OSS project, track your downloads.
The Open Source Business Metrics Guide

The Open Source Business Metrics Guide

How to Build, Grow, and Measure the Success of an Open Source Business
Messaging and Positioning Considerations for Introducing an Open Source Product

Messaging and Positioning Considerations for Introducing an Open Source Product

At the All Things Open conference, Emily Omier, a seasoned positioning consultant, sat down with Avi Press (Founder and CEO, Scarf) and Matt Yonkovit (The HOSS, Scarf) to discuss how to message, position, and validate your open source product on The Hacking Open Source Business Podcast. You can watch the full episode below or continue reading for a recap.