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.

How to Get the Attention of an Open Source Software Investor

How to Get the Attention of an Open Source Software Investor

On the Hacking Open Source Business podcast, Joseph Jacks aka JJ (Founder, OSS Capital) joins Avi Press (Founder and CEO, Scarf) and Matt Yonkovit (The HOSS, Scarf) to share what you need to know before starting a commercial open source software (COSS) company and how you can set yourself and your project apart in a way that attracts investor funding. As an investor who exclusively focuses on open source startups, JJ provides a VC perspective on what he looks for when evaluating investment opportunities.
Heroic Labs' Journey to Open Source and 5.3M Docker Downloads

Heroic Labs' Journey to Open Source and 5.3M Docker Downloads

On The Hacking Open Source Business podcast, CEO Chris Molozian and Head of Developer Relations Gabriel Pene at Heroic Labs elaborate on their usage and shift to open source and how it accelerated their adoption.
How to Keep Open Source Projects Open Source

How to Keep Open Source Projects Open Source

In this recap of the first episode of the Hacking Open Source Business Podcast, co-hosts Matt Yonkovit and Avi Press, Scarf Founder and CEO, dig into a recent controversy that highlights the challenges open source projects face trying to create sustainable revenue streams to support a business or a non-profit that funds the project’s growth.