Launch offer for the first 500 accounts: $10K MTR free for 24 months + $100 credit →
    .io

    Analytics & Attribution Pipeline

    Overview

    BillDog moves analytics and attribution data out in three ways today. None of them needs an extra SDK package:

    1. Server-side connectors. BillDog sends subscription lifecycle events from its servers to the tools you connect in the dashboard.
    2. Outgoing webhooks. BillDog delivers events to your own server.
    3. Attribution identifiers. Your app stores other vendors’ IDs on the BillDog customer, and they come back in the customer’s attribution data.

    Server-side connectors

    Connect them in Dashboard → Integrations (/dashboard/integrations). Each connector has an Events to Forward list. If you select none, every event is sent. BillDog stores secret fields encrypted, and each delivery attempt shows in the integration’s Recent Activity as success, failed or skipped.

    ConnectorCredentialsEvents offeredWhat it sends
    AmplitudeAPI key, project IDsubscription_created, subscription_cancelled, subscription_uncancelled, subscription_expired, purchase_completed, purchase_refundedAn HTTP API event with user_id = your app user ID (the BillDog customer ID when there is none), with USD revenue on purchases and renewals and negative revenue on refunds.
    MixpanelAPI key, project tokensubscription_created, subscription_cancelled, subscription_uncancelled, subscription_expired, purchase_completed, purchase_refundedA /track event with distinct_id = your app user ID (or BillDog customer ID), plus a profile update when the event carries profile fields such as email or plan.
    SegmentWrite keysubscription_created, subscription_cancelled, subscription_uncancelled, subscription_expired, purchase_completed, purchase_refundedA track call with userId = your app user ID (or BillDog customer ID), plus an identify call with traits when there are any.
    BrazeREST API key, REST endpointsubscription_created, subscription_cancelled, subscription_uncancelled, subscription_expired, purchase_completed, purchase_refunded, trial_ending, payment_failedA /users/track custom event (and a purchase for a paid purchase or renewal) for external_id = your app user ID. See the Braze page.
    AdjustApp token, S2S security token, one Adjust event token per eventsubscription_created, subscription_cancelled, subscription_uncancelled, subscription_expired, purchase_completed, purchase_refundedA server-to-server event attributed to the customer’s stored device identifiers. Events with no event token, or customers with no device identifiers, are skipped. See Attribution Integrations.
    AppsFlyerS2S key, iOS app ID and/or Android app IDsubscription_created, subscription_cancelled, subscription_uncancelled, subscription_expired, purchase_completed, purchase_refundedAn S2S Events API in-app event attributed to the customer’s AppsFlyer ID (setAppsflyerId), with USD af_revenue on purchases and renewals and negative af_revenue on refunds. Customers with no AppsFlyer ID, sandbox purchases, web purchases and platforms with no app ID are skipped. Event names below.
    PostHogProject API key, region (US, EU or self-hosted URL)subscription_created, subscription_cancelled, subscription_uncancelled, subscription_expired, purchase_completed, purchase_refundedA capture event with distinct_id = the stored PostHog distinct ID (setPosthogDistinctID), else your app user ID, else the BillDog customer ID, with USD revenue on purchases and renewals and negative revenue on refunds. See the PostHog page.
    SlackIncoming webhook URLsubscription_created, subscription_cancelled, subscription_uncancelled, subscription_expired, purchase_completed, purchase_refunded, payment_failed, trial_endingA channel message per event.
    SendGridAPI key, sender emailsubscription_created, trial_ending, payment_failed (on for a new integration), subscription_cancelled, subscription_uncancelled, subscription_expired, purchase_refundedAn email to the customer’s address. Sandbox events, customers without an email, and suppressed addresses are skipped.

    Which store events become which connector events

    • subscription_created: a subscription or free trial starts.
    • purchase_completed: a subscription renews, or a one-time purchase completes.
    • subscription_cancelled: auto-renew is turned off. The customer keeps access until the period ends.
    • subscription_uncancelled: auto-renew is turned back on.
    • subscription_expired: the subscription ends and access stops.
    • purchase_refunded: a store purchase is refunded. Amplitude, Mixpanel, Segment, PostHog and AppsFlyer receive it as negative revenue. Stripe web refunds aren’t forwarded yet.
    • payment_failed: a payment fails (a renewal billing issue or grace period, or a failed Stripe web checkout payment).
    • trial_ending: once per App Store or Google Play trial period, about three days before it ends (BillDog checks hourly; a trial shorter than that is sent on the first check), or when Stripe reports a web trial is about to end. Sandbox trials are sent with is_sandbox: true.

    Each lifecycle fact is its own event, as in RevenueCat’s integrations, so one churn sends one subscription_cancelled. Until November 2026, expirations and refunds were also sent as subscription_cancelled. An integration saved before then keeps the events it had: tick subscription_expired, purchase_refunded and subscription_uncancelled to receive them. An integration with no events selected receives every event, the new ones included.

    Revenue is always USD: purchases and renewals carry their USD amount, refunds the same amount negative, and other events none. The price in the customer’s own currency travels as price_local and currency. Pausing a subscription isn’t forwarded to connectors.

    AppsFlyer event names

    The AppsFlyer connector posts to the S2S Events API (api3.appsflyer.com/inappevent/<app ID>) with your S2S key. An App Store event goes to your iOS app ID (BillDog adds the id prefix if you enter only the number) and a Google Play event to your Android app ID. AppsFlyer attributes S2S events by AppsFlyer ID, so the customer needs one: call setAppsflyerId with getAppsFlyerUID() before the first purchase. An AppsFlyer ID imported from RevenueCat ($appsflyerId) or Adapty is used too. The customer’s IDFA, IDFV and Google advertising ID go along when the app collected them, and customer_user_id is your app user ID.

    BillDog eventAppsFlyer eventName (default)Revenue
    subscription_created, free trialaf_start_trialNone
    subscription_created, paidaf_subscribeUSD price
    purchase_completed, renewalaf_subscribe with renewal: "true"USD price
    purchase_completed, one-time purchaseaf_purchaseUSD price
    purchase_refundedbilldog_refundUSD price, negative
    subscription_cancelledbilldog_cancellationNone
    subscription_uncancelledbilldog_uncancellationNone
    subscription_expiredbilldog_expirationNone

    af_start_trial, af_subscribe and af_purchase are AppsFlyer’s recommended event names. AppsFlyer has none for refunds, cancellations or expiries, so those use BillDog custom names. You can rename any of them in the integration’s Event Names fields. Revenue goes in eventValue as af_revenue with af_currency: "USD", along with af_content_id (product ID) and af_order_id (transaction ID). AppsFlyer’s S2S API has no sandbox mode, so sandbox purchases aren’t sent. Test Connection sends nothing, because a test has no AppsFlyer ID; the first real event checks the key.

    Outgoing webhooks

    To receive events on your own server (and forward them anywhere you like), register a webhook endpoint. The event catalogue, payloads and delivery behaviour are in the Webhooks reference.

    Attribution identifiers

    The SDK’s attribution setters (setAdjustId, setAppsflyerId, setFirebaseAppInstanceId, setBrazeID and the rest) store each vendor’s identifier on the BillDog customer. They come back in the customer’s attribution data. The AppsFlyer connector reads the stored AppsFlyer ID and the PostHog connector the stored PostHog distinct ID. Adjust uses device identifiers, not the Adjust ID, and no other connector reads these stored IDs yet. The setters and their consent rules are covered in Attribution Integrations.

    Coming soon

    • Cross-product integration SDK (@billdog.io/integration): a client-side chain from notification to paywall to purchase, with automatic routing of notification actions. It isn’t published to npm, and there is no Swift or Kotlin equivalent yet.
    • Client-side event stream: subscribing to BillDog analytics events in your app to forward them to Firebase, Amplitude or Mixpanel. Until then, use the server-side connectors above.
    • Forwarding keyed on stored attribution IDs (Branch, Firebase).

    Was this page helpful?

    Or rate this page:

    We use cookies and process your data to provide our services. By continuing, you agree to our Terms and Privacy Policy.