StackSee Analytics
Providers

Bento Provider

Email marketing and automation with event tracking

Bento is an email marketing and automation platform with built-in event tracking capabilities.

Installation

# Client-side: No installation needed (uses CDN)
# Server-side:
pnpm install @bentonow/bento-node-sdk

Important Limitations

Bento does not support anonymous page views. The Bento Node SDK requires an email address for all tracking events, including page views. This means:

  • Page views from anonymous users (not yet identified) will be skipped with a warning
  • You should exclude pageView from Bento and use another provider (like PostHog or Pirsch) for anonymous page view tracking
  • Only use Bento for identified user events and custom tracking after calling identify()

Recommended Configuration: Always exclude pageView from Bento by default and explicitly enable it only if you're certain all visitors will be identified before page views are tracked.

Client-Side Usage

Recommended setup (with page views disabled):

import { createClientAnalytics } from '@stacksee/analytics/client';
import { BentoClientProvider } from '@stacksee/analytics/providers/client';
import { PostHogClientProvider } from '@stacksee/analytics/providers/client';

const analytics = createClientAnalytics({
  providers: [
    // Use PostHog for page views and anonymous tracking
    new PostHogClientProvider({
      apiKey: 'your-posthog-key',
      host: 'https://app.posthog.com'
    }),
    // Use Bento only for identified user events (pageView excluded by default)
    {
      provider: new BentoClientProvider({
        siteUuid: 'your-bento-site-uuid'
      }),
      exclude: ['pageView']
    }
  ]
});

await analytics.initialize();

Advanced: Enable page views only if all users are identified:

const analytics = createClientAnalytics({
  providers: [
    // Only use this if you identify ALL users before any page views
    new BentoClientProvider({
      siteUuid: 'your-bento-site-uuid'
    })
  ]
});

Server-Side Usage

Recommended setup (with page views disabled):

import { createServerAnalytics } from '@stacksee/analytics/server';
import { BentoServerProvider } from '@stacksee/analytics/providers/server';
import { PirschServerProvider } from '@stacksee/analytics/providers/server';

const serverAnalytics = createServerAnalytics({
  providers: [
    // Use Pirsch for page views
    new PirschServerProvider({
      accessToken: process.env.PIRSCH_ACCESS_TOKEN!
    }),
    // Use Bento only for identified user events (pageView excluded by default)
    {
      provider: new BentoServerProvider({
        siteUuid: process.env.BENTO_SITE_UUID!,
        authentication: {
          publishableKey: process.env.BENTO_PUBLISHABLE_KEY!,
          secretKey: process.env.BENTO_SECRET_KEY!
        }
      }),
      exclude: ['pageView']
    }
  ]
});

Advanced: Enable page views only if all users are identified:

const serverAnalytics = createServerAnalytics({
  providers: [
    // Only use this if you identify ALL users before any page views
    new BentoServerProvider({
      siteUuid: process.env.BENTO_SITE_UUID!,
      authentication: {
        publishableKey: process.env.BENTO_PUBLISHABLE_KEY!,
        secretKey: process.env.BENTO_SECRET_KEY!
      }
    })
  ]
});

Typical Use Cases

Bento works best for:

  • Email marketing automation - Trigger email campaigns based on user behavior
  • User onboarding flows - Track identified user journeys and send targeted onboarding emails
  • Product-led growth - Segment users based on feature usage and engagement
  • Customer lifecycle tracking - Monitor user activity after they sign up

Not recommended for:

  • Anonymous page view tracking (use PostHog, Pirsch, or other analytics providers)
  • High-volume event tracking without user identification
  • Real-time analytics dashboards

Additional Notes

  • Events may take 1-3 minutes to appear in Bento (batch API)
  • User context is automatically extracted from identify() calls
  • Always call identify() with a valid email before tracking events
  • Use provider routing with exclude: ['pageView'] to prevent anonymous page view warnings

Resources