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

billdogeng-vue

v1.0.0-beta.1

Published

BilldogEng SDK for Vue 3 — SSR-safe, idiomatic Vue/TS wrapper over the BillDog engagement suite (analytics, surveys, in-app messaging, remote feature flags).

Downloads

165

Readme

billdogeng-vue

The BillDog engagement suite for Vue 3 — a thin, idiomatic, SSR-safe wrapper over the existing browser SDKs (@billdog.io/web, @billdog.io/analytics, @billdog.io/survey-core).

It surfaces, the Vue way (a plugin + composables + a component):

  • initcreateBilldog() plugin (or <BilldogProvider> / useProvideBilldog)
  • analyticscapture / identify / group via useBilldog()
  • surveys — fetch / list / submit + a render component (useSurvey, <Survey/>)
  • in-app messaginguseBilldog().showInAppMessages()
  • feature flagsremote / server-authoritative via useFeatureFlag()

Feature flags are remote. All targeting is evaluated on the BillDog backend. This package performs no local bucketing and contains no murmurhash — that is forbidden by the BillDog architecture. useFeatureFlag simply reads the value the backend already decided and cached.

Install

npm install billdogeng-vue @billdog.io/web @billdog.io/analytics @billdog.io/survey-core

The three @billdog.io/* packages are optional peer dependencies — install the ones whose features you use. vue (>=3.3) is a required peer.

Quick start (plugin)

import { createApp } from 'vue';
import { createBilldog } from 'billdogeng-vue';
import App from './App.vue';

const app = createApp(App);
app.use(
  createBilldog({
    apiKey: 'bd_live_xxx',
    projectId: 'proj_123',
    // customerId?, anonymousId?, autoloadFeatureFlags? (default true)
  }),
);
app.mount('#app');

Scoped alternative — <BilldogProvider>

<script setup lang="ts">
import { BilldogProvider } from 'billdogeng-vue';
const config = { apiKey: 'bd_live_xxx', projectId: 'proj_123' };
</script>

<template>
  <BilldogProvider :config="config">
    <App />
  </BilldogProvider>
</template>

Analytics

<script setup lang="ts">
import { useBilldog } from 'billdogeng-vue';
const { capture, identify, group, showInAppMessages } = useBilldog();

identify('user_42', { plan: 'pro' });
group('company', 'acme', { seats: 5 });
capture('page_view', { path: '/home' });

// in-app messaging trigger
showInAppMessages('home_banner');
</script>

Feature flags (remote)

<script setup lang="ts">
import { useFeatureFlag } from 'billdogeng-vue';

// boolean on/off flag
const newCheckout = useFeatureFlag('new-checkout', false);
// multivariate (string variant)
const theme = useFeatureFlag('theme', 'classic');
</script>

<template>
  <CheckoutV2 v-if="newCheckout" />
  <CheckoutV1 v-else />
</template>

The returned ref re-evaluates automatically whenever the SDK re-fetches flags from the backend.

Surveys

Component

<script setup lang="ts">
import { Survey } from 'billdogeng-vue';
</script>

<template>
  <Survey
    survey-id="svy_nps"
    @submit="(result, answers) => console.log(result, answers)"
    @error="(e) => console.error(e)"
  />
</template>

Custom rendering (scoped slot)

<Survey survey-id="svy_nps" v-slot="{ survey, loading, setAnswer, submit }">
  <p v-if="loading">Loading…</p>
  <form v-else-if="survey" @submit.prevent="submit">
    <!-- drive the form yourself with `setAnswer(questionId, { ... })` -->
  </form>
</Survey>

Composable

import { useSurvey } from 'billdogeng-vue';

const { survey, loading, error, submit, refetch } = useSurvey('svy_nps');
await submit([{ question_id: 'q1', answer_choices: ['great'] }]);

SSR (Nuxt / Vite SSR)

The package is SSR-safe out of the box:

  • The engagement client is only instantiated in the browser (onMounted, plus a typeof window guard in the plugin).
  • Importing the package on the server never touches window/document; the underlying browser SDKs are loaded with dynamic import() only on the client.
  • During server render, useBilldog().ready is false, useFeatureFlag returns its default, and surveys do not fetch — everything activates on the client after hydration.

For Nuxt, register the plugin in a client plugin file (plugins/billdog.client.ts) so it only runs in the browser:

// plugins/billdog.client.ts
import { createBilldog } from 'billdogeng-vue';

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(
    createBilldog({ apiKey: 'bd_live_xxx', projectId: 'proj_123' }),
  );
});

License

MIT