PerfBeacon Logo
Sign inSign up

New Feature: Deployment tracking!

Max Rozen

Wish you could automatically track your website's performance each time you deploy?

Today we're releasing a new deployment tracking feature to let you do just that.

  • No more manually running Google Lighthouse before and after each deployment
  • View a list of your results and filter to only show deployments

I've personally used the feature to track performance improvements for PerfBeacon itself, and have reduced the app's time to interactive by more than half!

PerfBeacon results
Tracking PerfBeacon's deployments as I reduce TTI by more than half

For more detail on how I managed to more than half PerfBeacon's TTI, see this article.


Before we get started, you'll need two things:

  • An OS with support for Bash scripts
  • an API Token

  • a Site ID

    • You can find the Site ID in the Settings tab when you click into a Site
    • PerfBeacon Site ID

Let's track deployments!

  1. Create a bash script called with the following contents:


curl --request POST \
 --url \
 --header 'content-type: application/json' \
 --data "{\"token\": \"${TOKEN}\", \"site_id\": \"${SITE_ID}\"}"
  1. Make sure to replace <siteId> with the Site ID, and <token> with your token.
  2. Run chmod +x ./
  3. You should now be able to run ./ in your Terminal, and have PerfBeacon's API respond with some metadata.

It's not particularly useful to just track deployments without knowing which git commit was deployed. We can also send PerfBeacon the hash of the deployed commit.

  1. Reopen and change the contents to:

CURRENT_HASH=$(git rev-parse HEAD)

curl --request POST \
 --url \
 --header 'content-type: application/json' \
 --data "{\"token\": \"${TOKEN}\", \"site_id\": \"${SITE_ID}\", \"commit_id\": \"${CURRENT_HASH}\"}"

At PerfBeacon, we run a similar script to this as part of our CI build process.

Enjoyed this post? Receive the next one in your inbox!


  • Features



© 2019-2021 Max Rozen. All rights reserved.