Documentation

Deployment tracking

Tag every release with version, commit, and environment. PagePulse diffs Core Web Vitals and JS size between releases automatically.

Deployment tracking tags every release in your production environment so PagePulse can diff Core Web Vitals, JavaScript bundle size, route load time, and error rate before and after the release. Regressions are surfaced within minutes of going live.

Marking a deployment

Call PagePulse.deployment once per release, after the deploy succeeds. Pass a version string, the environment, and the commit SHA. PagePulse correlates every RUM sample collected after the call with the new deployment.

typescript
PagePulse.deployment({
  version: 'v2.8.1',
  environment: 'production',
  commit: process.env.GIT_SHA,
  branch: process.env.GIT_BRANCH,
  author: process.env.GIT_AUTHOR,
});

CI/CD integration

The most reliable pattern is to call PagePulse.deployment from your CI/CD pipeline after a successful deploy. This ensures every release is tagged, even if your team forgets to do it manually.

yaml
# .github/workflows/deploy.yml
name: Deploy
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Deploy to production
        run: ./scripts/deploy.sh
      - name: Mark deployment in PagePulse
        env:
          PAGEPULSE_PROJECT_ID: ${{ secrets.PAGEPULSE_PROJECT_ID }}
          PAGEPULSE_API_KEY: ${{ secrets.PAGEPULSE_API_KEY }}
          GIT_SHA: ${{ github.sha }}
        run: |
          curl -X POST https://api.pagepulse.dev/v2/deployments \
            -H "Authorization: Bearer $PAGEPULSE_API_KEY" \
            -H "Content-Type: application/json" \
            -d "{
              \"projectId\": \"$PAGEPULSE_PROJECT_ID\",
              \"version\": \"$(git describe --tags --always)\",
              \"environment\": \"production\",
              \"commit\": \"$GIT_SHA\"
            }"

Canary and A/B variants

Tag deployments as canary, blue/green, or A/B test variants. PagePulse will compare the performance of each variant against the control, surface statistically significant differences, and help you decide whether to roll forward or roll back.

typescript
PagePulse.deployment({
  version: 'v2.8.1',
  environment: 'production',
  commit: 'a1b2c3d',
  variant: 'canary',
  trafficPercent: 10,
});

Have a question about this doc?