Analytics Overview

Understand how Nebutra tracks product usage with PostHog and marketing performance with Dub.co.

Nebutra ships with two complementary analytics tools baked in:

  • PostHog — product analytics, feature flags, session recording, and funnel analysis
  • Dub.co — link management, UTM tracking, and short-URL analytics for marketing campaigns

Together they give you full visibility from the first marketing click all the way through a user's in-product journey.

Tool Responsibilities

PostHog handles everything that happens inside the product:

  • Custom event tracking (track(...))
  • User and org identification (identify(...))
  • Funnel analysis (sign-up → activate → upgrade)
  • Session recording for UX debugging
  • Feature flags tied to billing plan
  • A/B testing experiments
  • Cohort and retention analysis

Dub.co handles everything before the product:

  • Branded short links (links.nebutra.com/...)
  • UTM parameter management for campaigns
  • Click-through analytics per campaign
  • Referral source attribution
  • Marketing email link tracking

Built-in Tracked Events

Every Nebutra deployment automatically captures the following events without any additional code:

EventCategoryDescription
user_signed_upAuthNew user completes registration
org_createdAuthOrganisation is provisioned
project_createdCoreUser creates a new project
project_deletedCoreUser deletes a project
api_key_createdCoreAPI key is generated
invitation_sentTeamsOrg admin sends a member invite
member_joinedTeamsInvited user accepts and joins
plan_upgradedBillingSubscription moves to a higher tier
plan_downgradedBillingSubscription moves to a lower tier
subscription_canceledBillingUser cancels their subscription
quota_warningMeteringUsage reaches 80% of quota
quota_exceededMeteringUsage reaches 100% of quota
ai_chat_startedAIAI chat session is initiated
ai_chat_completedAIAI chat session ends successfully

Setup Overview

No complex SDK configuration is required. Nebutra reads server and browser environment variables for PostHog, plus one for Dub.co:

# PostHog
POSTHOG_KEY=phc_xxxxxxxxxxxx
POSTHOG_HOST=https://app.posthog.com
NEXT_PUBLIC_POSTHOG_KEY=phc_xxxxxxxxxxxx
NEXT_PUBLIC_POSTHOG_HOST=https://app.posthog.com   # or your self-hosted URL

# Dub.co
DUB_API_KEY=dub_xxxxxxxxxxxx

Once the variables are set, all built-in events begin flowing automatically.

Analytics Dashboard

An aggregate analytics view is available in the admin panel at /admin/analytics. It surfaces:

  • Daily/weekly/monthly active users
  • Top funnel conversion rates
  • Plan distribution breakdown
  • Quota utilisation across tenants

The admin analytics dashboard requires the admin role. Standard users cannot access /admin/* routes.

Privacy Considerations

PostHog collects behavioural data. Depending on your deployment region and compliance requirements:

  • Cloud (EU): Use https://eu.posthog.com as POSTHOG_HOST and NEXT_PUBLIC_POSTHOG_HOST to keep data in the EU.
  • Self-hosted: Deploy PostHog on your own infrastructure. Set both PostHog host variables to your instance URL.
  • Session recording: Can be disabled per tenant or globally — see PostHog docs.
  • GDPR: PostHog supports data deletion requests via their API.

Dub.co only processes public URL click data. No PII is sent to Dub.co by default.


How is this guide?

Edit on GitHub

Last updated on

On this page