Skillpedia
التحليل وجداول البيانات41k · #6852

modeling-revenue-metrics

ما الذي تفعله

تنمذج هذه المهارة مقاييس الإيراد المتكرر والإجمالي، بما فيها MRR وARR والتوقف وقيمة العميل الدائمة، من بيانات الفوترة أو أحداث الإيراد. وهي مناسبة لفرق المالية والنمو التي تريد أرقام إيرادات موثوقة.

متى تستخدمها

  • ✓عندما تريد حساب الإيراد المتكرر الشهري أو السنوي من بيانات الفوترة لديك.
  • ✓عندما تريد معرفة التوقف أو التوسع أو القيمة الدائمة لكل عميل.
  • ✓عندما تريد أرقام إيرادات تأتي من العروض المُدارة في PostHog.

رابط المهارة

https://github.com/PostHog/posthog/blob/master/products/data_modeling/skills/modeling-revenue-metrics/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/PostHog/posthog/blob/master/products/data_modeling/skills/modeling-revenue-metrics/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“احسب الإيراد المتكرر الشهري والتوقف لدينا خلال الأشهر الستة الأخيرة من بيانات Stripe.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يستخدم الذكاء الاصطناعي العروض المُدارة في PostHog لمنصة فوترة متصلة، أو أحداث الإيراد المخصصة إذا لم تكن هناك منصة متصلة. ثم يحسب المقاييس المختارة ويحفظها كنماذج قابلة لإعادة الاستخدام، فتبقى الأرقام متسقة.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Modeling revenue metrics

Turn payment/subscription data into durable revenue models. Read modeling-warehouse-foundations first for the view-vs-dbt decision, the view-* workflow, and convertCurrency(); this skill is the revenue-specific layer on top. Metric definitions live in references/revenue-metric-definitions.md; copy-paste recipes in references/posthog/ and references/dbt/.

Step 1 — find where revenue lives

Revenue reaches PostHog two ways; both feed the same managed revenue views:

  • A payment platform as a warehouse source — Stripe today (Chargebee/Polar/RevenueCat coming). Best when the business runs on a billing platform. Connect via setting-up-a-data-warehouse-source.
  • Custom revenue events — you send events (e.g. purchase_completed) with a revenue property. Best when there's no supported platform or you already track revenue in-product.

If neither exists yet, use suggesting-data-imports to recommend a source. In dbt, the equivalent is staging whichever billing tables landed in the warehouse.

Step 2 — model on the managed views, not raw tables

PostHog auto-generates a curated set of views per source. Do not re-derive revenue from raw Stripe tables — the managed views already handle deferred-revenue recognition, currency, and a stable schema.

Each source gets its own views. There is no cross-source view. Names depend on the source type:

  • Warehouse source: <source>.<prefix>.<kind>_revenue_view, for example stripe.prod.mrr_revenue_view. The <prefix>. part is absent when the source has no prefix.
  • Custom revenue events: revenue_analytics.events.<event_name>.<kind>_events_revenue_view, where every non-alphanumeric character in the event name becomes _.

<kind> is one of the managed views in the table below. Discover the exact names. Do not search for revenue_analytics, because it does not match warehouse source views:

SELECT table_name FROM system.information_schema.tables
WHERE position(table_name, 'revenue_view') > 0 ORDER BY table_name

If this returns nothing, the project has no revenue source configured yet. Check the governed mrr metric (metric-list) or discover warehouse billing tables, and read their columns before modeling. Do not guess view names.

Managed view Grain Use for
revenue_item (start here) 1 / invoice line item Gross revenue, monthly recurring revenue, revenue by product/customer/period. Implements deferred revenue + currency.
mrr 1 / (customer, subscription) Live snapshot of current MRR — not a time series.
customer 1 / customer dim_customer: email, country, cohort, metadata.
subscription 1 / subscription Subscription state for churn/expansion logic.
charge 1 / charge Raw charges; prefer revenue_item unless you specifically need charges.
product 1 / product Product dimension.

Key revenue_item columns: amount (already converted to the project base currency), currency (that base currency), original_amount / original_currency (as charged), is_recurring, customer_id, subscription_id, product_id, group_0_key…group_4_key (B2B account keys), timestamp.

Rules before you model (revenue gotchas)

  1. MRR is empty without a subscription config. For event-based revenue, MRR only populates when a subscription property is configured. Empty MRR + populated gross revenue is expected behaviour, not a bug — say so instead of "fixing" it.
  2. **The mrr manag
الأسئلة الشائعة

هل أحتاج إلى Stripe؟

Stripe مدعوم حالياً كمصدر للفوترة. وبدونه، يمكنك إرسال الإيرادات كأحداث مخصصة.

هل يُحسب الإيراد من جداول الفوترة الخام؟

لا. العروض المُدارة تتولى الاعتراف بالإيراد والعملة، لذلك تستخدمها المهارة بدلاً من الجداول الخام.

ما مقاييس الإيراد التي تستطيع حسابها؟

تغطي الإيراد المتكرر مثل MRR وARR، والإيراد الجديد والتوسع والمُلغى، ومتوسط الإيراد لكل مستخدم وقيمته الدائمة.

التفاصيل

الوصف الأصلي من المؤلف

Build reusable revenue models — MRR, ARR, gross revenue, new/expansion/contraction/churn, ARPU, LTV, and per-customer/per-account revenue — on either PostHog data-warehouse views (HogQL) or an external dbt project. Use when the user wants to model, define, or compute recurring revenue, monthly/annual recurring revenue, churn or retention of revenue, lifetime value, average revenue per user, or revenue by customer, cohort, product, or currency. On PostHog, build on the managed *_revenue_view views (revenue_item, mrr, customer, subscription, charge, product) fed by Stripe or custom revenue event

repo: PostHog/posthog

الشعبية

نجوم GitHub
41k
الترتيب
#6852
الترخيص
—
آخر تحديث
2‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة