[Resource](/blog-category/resource/) September 7, 2021

# Measuring Downloads of Anything You Distribute

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.

By Avi Press Founder & CEO

![Measuring Downloads of Anything You Distribute](/imported/posts/f206064181fa2ca7.png)

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 `.zip`, or  `.tar.gz`, text files like `JSON`, 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.

![Supporting image 1 for Measuring Downloads of Anything You Distribute](/imported/posts/f206064181fa2ca7.png)

##### 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](https://github.com/aviaviavi/curl-runnings). On the [releases page](https://github.com/aviaviavi/curl-runnings/releases), 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:

```
https://github.com/aviaviavi/curl-runnings/releases/download/0.16.0/curl-runnings-0.16.0-mac.tar.gz
```

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:

```
https://github.com/aviaviavi/curl-runnings/releases/download/{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, `downloads.avi.press`, and pick a new incoming URL path `/curl-runnings-{version}-{platform}.tar.gz`. Now, a URL like:

```
https://downloads.avi.press/curl-runnings-0.15.0-linux.tar.gz
```

Will resolve to:

```
https://github.com/aviaviavi/curl-runnings/releases/download/0.15.0/curl-runnings-0.15.0-linux.tar.gz
```

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.

![Supporting image 2 for Measuring Downloads of Anything You Distribute](/imported/posts/2ff90583bfc1b169.png)

![Supporting image 3 for Measuring Downloads of Anything You Distribute](/imported/posts/7dfe1e9522816ba9.png)

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 `version=0.16.0` and `platform=mac`. Histograms for all variables are available within the Scarf Dashboard.

![Supporting image 4 for Measuring Downloads of Anything You Distribute](/imported/posts/5acb3f8f78bb66fa.png)

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](https://app.scarf.sh/register), or head to the [docs](https://docs.scarf.sh/gateway) to learn more. We’re excited to see what you build!

GET STARTED

Related Resources

[![](/imported/social-og/56df6684ceae399c-9c0647d5.png)

Resource Sep 5, 2023

### Beyond the Surface: How to Engage with the Quiet Members of your Open Source Community

In the dynamic realm of community management, marketing, and developer relations, success depends upon more than just attracting attention. It's about fostering meaningful relationships, nurturing engagement, and amplifying your community's impact.



](/post/beyond-the-surface-how-to-engage-with-the-quiet-members-of-your-open-source-community/)[![](/imported/social-og/9277af8f0c81f6d2-3589135f.png)

Resource Sep 1, 2023

### Why Open Source Projects and Companies Should Adopt "Open Source Qualified Leads"

The modern digital age, driven by the proliferation of open-source projects, is as much about community as it is about the code. This means understanding and engaging with potential adopters, contributors, and users becomes critical for the health and success of a project or product. Here enters the concept of "Open Source Qualified Leads" (OQL).



](/post/why-open-source-projects-and-companies-should-adopt-open-source-qualified-leads/)[![](/imported/social-og/dfcfee806089be6a-45bd3ca2.png)

Resource Aug 3, 2023

### Mastering Telemetry in Open Source: A Simple Guide to Building Lightweight Call Home Functionality

Implementing a call-home functionality or telemetry within open-source software often raises privacy concerns within the community. Many parties, including enterprise security teams, customer advocates, and developers, express rightful apprehensions about the transmission, storage, and usage of data.



](/post/mastering-telemetry-in-open-source-a-simple-guide-to-building-lightweight-call-home-functionality/)

Article Notes [**Browse all resources**

Search, categories, and latest Scarf writing.

](/resources)[**See pricing**

Understand how Scarf packages its offering.

](/pricing)
