npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rawdash/connector-branch

v0.27.0

Published

Rawdash connector for Branch — syncs daily install/open/conversion attribution metrics and deep-link click events via the Branch Cross-Platform Analytics API

Readme

@rawdash/connector-branch

npm version license

Sync Branch install attribution metrics (installs, opens, conversions) and deep-link click events from the Query API for mobile attribution dashboards.

Install

npm install @rawdash/connector-branch

Authentication

A Branch app key and secret, sent together in the Query API request body to authenticate each call.

  1. In the Branch dashboard, open Account Settings -> Profile and copy the Branch Key (starts with key_live_).
  2. On the same screen, reveal and copy the Branch Secret (starts with secret_live_). Both values are app-scoped; keep them in a secret store.
  3. Reference them from the connector config as branchKey: secret("BRANCH_KEY") and branchSecret: secret("BRANCH_SECRET").

Configuration

| Field | Type | Required | Description | | -------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------- | | branchKey | secret | Yes | Your Branch app key (starts with key_live_). Find it in the Branch dashboard under Account Settings -> Profile. | | branchSecret | secret | Yes | Your Branch app secret (starts with secret_live_). Find it next to the key in the Branch dashboard. | | lookbackDays | number | No | How many calendar days of metrics/events to fetch on a full sync. Defaults to 90. | | resources | array | No | Which Branch resources to sync. Omit to sync all of them. |

Resources

  • branch_install_metrics (metric) - Daily Branch attribution metrics bucketed by channel and campaign. Primary value is installs; opens and conversions are carried as attributes.
    • Endpoint: POST /v1/query/analytics
    • Unit: installs
    • Granularity: day
    • Dimensions: date, channel, campaign, installs, opens, conversions
    • Merges three Query API calls (data_source=eo_install, eo_open, eo_custom_event) keyed by (date, channel, campaign). Rows with missing channel or campaign are recorded as null for that attribute.
  • branch_deep_link_event (event) - Daily aggregated Branch deep-link click events bucketed by channel, campaign, and feature. One event per (date, channel, campaign, feature) row carrying the daily click count.
    • Endpoint: POST /v1/query/analytics
    • Sourced from data_source=eo_click. Event id encodes the bucket so resyncs are idempotent.
    • date: Calendar day of the click bucket (UTC).
    • channel: Branch last-attributed channel.
    • campaign: Branch last-attributed campaign.
    • feature: Branch last-attributed feature (e.g. sharing).
    • clicks: Click count for the bucket.

Example

import {
  defineConfig,
  defineDashboard,
  defineMetric,
  secret,
} from '@rawdash/core';

const branch = {
  name: 'branch',
  connectorId: 'branch',
  config: {
    branchKey: secret('BRANCH_KEY'),
    branchSecret: secret('BRANCH_SECRET'),
    lookbackDays: 90,
  },
};

export default defineConfig({
  connectors: [branch],
  dashboards: {
    mobile: defineDashboard({
      widgets: {
        installs_30d: {
          kind: 'stat',
          title: 'Branch installs (30d)',
          window: '30d',
          metric: defineMetric({
            connector: branch,
            shape: 'metric',
            name: 'branch_install_metrics',
            field: 'installs',
            fn: 'sum',
          }),
        },
        daily_installs: {
          kind: 'timeseries',
          title: 'Daily installs by channel',
          window: '30d',
          metric: defineMetric({
            connector: branch,
            shape: 'metric',
            name: 'branch_install_metrics',
            field: 'installs',
            fn: 'sum',
          }),
        },
      },
    }),
  },
});

Rate limits

The Branch Query API allows roughly 5 requests/second, 20/minute, and 150/hour per app. Because each sync splits its window into <=7-day segments and paginates, a wide window fans out to many requests; the connector relies on the shared HTTP client to honor 429 responses and the Retry-After header with backoff.

Limitations

  • Daily granularity only - the connector requests granularity=day from the Branch Query API to keep result cardinality bounded.
  • Branch rejects windows wider than 7 days, so each requested range is split into <=7-day segments and fetched one segment at a time.
  • Deep-link events are aggregated daily click counts per (date, channel, campaign, feature). Individual click-level records require the Branch Daily Export API which is intentionally out of scope.

Links

License

Apache-2.0