App Analytics

Stripe cung cấp analytics tích hợp cho các app marketplace đã xuất bản, giúp bạn có cái nhìn rõ ràng về lượt cài đặt, hiệu suất listing và mức độ tương tác của người dùng. Bạn cũng có thể xây dựng analytics tùy chỉnh bằng webhooks và Stripe API.

Báo Cáo Có Sẵn

Stripe Dashboard cung cấp các analytics sau cho app đã xuất bản của bạn:

Số Liệu Cài Đặt

Số LiệuMô Tả
InstallsTổng số lượt cài đặt app mới trong kỳ đã chọn
UninstallsTổng số lượt gỡ cài đặt app trong kỳ đã chọn
Cumulative Net InstallsTổng tích lũy số lượt cài đặt trừ gỡ cài đặt theo thời gian

Hiệu Suất Listing

Số LiệuMô Tả
Listing ViewsTổng số lượt xem trang listing marketplace của app
Unique ViewsKhách truy cập duy nhất đã xem listing marketplace của bạn
MoM Conversion RateTỷ lệ phần trăm tháng-qua-tháng của người xem listing cài đặt app

Số Liệu Tăng Trưởng

Số LiệuMô Tả
MoM Growth RateTăng trưởng tháng-qua-tháng trong net installs
Churn RateTỷ lệ phần trăm người dùng đã cài đặt gỡ cài đặt mỗi tháng

Độ Mới Của Dữ Liệu

Caution

Dữ liệu analytics có độ trễ 48 giờ. Dữ liệu bạn thấy trong dashboard phản ánh hoạt động từ khoảng hai ngày trước. Lên kế hoạch cửa sổ báo cáo của bạn phù hợp.

  • Dữ liệu được cập nhật hàng ngày với độ trễ xử lý 48 giờ
  • Dữ liệu lịch sử có sẵn từ ngày app được xuất bản lần đầu
  • Các số liệu được tính theo múi giờ UTC
  • Xuất dữ liệu dưới dạng CSV từ Stripe Dashboard để phân tích bên ngoài

Truy Cập Analytics Qua API

Bạn có thể truy cập analytics app theo chương trình bằng Stripe Reporting API:

Dữ Liệu Cài Đặt

Terminal window
# Fetch app install report
curl https://api.stripe.com/v1/reporting/report_runs \
-u sk_live_xxxxx: \
-d "report_type=app.installs.daily" \
-d "parameters[interval_start]=1709251200" \
-d "parameters[interval_end]=1711929600" \
-d "parameters[app_id]=com.tajo.brevo-integration"

Lượt Xem Listing

Terminal window
# Fetch listing views report
curl https://api.stripe.com/v1/reporting/report_runs \
-u sk_live_xxxxx: \
-d "report_type=app.listing_views.daily" \
-d "parameters[interval_start]=1709251200" \
-d "parameters[interval_end]=1711929600" \
-d "parameters[app_id]=com.tajo.brevo-integration"

Truy Cập Theo Chương Trình (Node.js)

const stripe = require('stripe')('sk_live_xxxxx');
// Create a report run for app installs
const reportRun = await stripe.reporting.reportRuns.create({
report_type: 'app.installs.daily',
parameters: {
interval_start: Math.floor(new Date('2025-03-01').getTime() / 1000),
interval_end: Math.floor(new Date('2025-03-31').getTime() / 1000),
app_id: 'com.tajo.brevo-integration',
},
});
// Poll for report completion
const checkReport = async (reportId) => {
const report = await stripe.reporting.reportRuns.retrieve(reportId);
if (report.status === 'succeeded') {
// Download the report file
const file = await stripe.files.retrieve(report.result.id);
console.log('Report URL:', file.url);
return file;
}
if (report.status === 'failed') {
throw new Error('Report generation failed');
}
// Report still processing
return null;
};

Tab Users

Tab Users trong analytics của app hiển thị dữ liệu cấp tài khoản riêng lẻ:

CộtMô Tả
Account IDTài khoản Stripe đã cài đặt app của bạn
Install DateThời điểm app được cài đặt
StatusĐang hoạt động hoặc đã gỡ cài đặt
Uninstall DateThời điểm app bị gỡ cài đặt (nếu có)

Sử dụng dữ liệu này để:

  • Theo dõi trạng thái kích hoạt tài khoản riêng lẻ
  • Theo dõi các tài khoản đã cài đặt nhưng chưa hoàn thành onboarding
  • Xác định các tài khoản đã gỡ cài đặt và hiểu nguyên nhân churn
  • Tương quan dữ liệu cài đặt với analytics nền tảng của bạn

Analytics Tùy Chỉnh Với Webhooks

Để có analytics theo thời gian thực và thông tin sâu hơn, hãy thiết lập webhooks để theo dõi sự kiện app:

Sự Kiện Webhook

Lắng nghe các sự kiện này để xây dựng analytics tùy chỉnh:

Sự KiệnMô Tả
account.application.authorizedNgười dùng đã cài đặt app của bạn
account.application.deauthorizedNgười dùng đã gỡ cài đặt app của bạn

Webhook Handler

const express = require('express');
const stripe = require('stripe')('sk_live_xxxxx');
const app = express();
app.post('/webhooks/stripe-app', express.raw({ type: 'application/json' }), async (req, res) => {
const sig = req.headers['stripe-signature'];
const webhookSecret = process.env.STRIPE_APP_WEBHOOK_SECRET;
let event;
try {
event = stripe.webhooks.constructEvent(req.body, sig, webhookSecret);
} catch (err) {
console.error('Webhook signature verification failed:', err.message);
return res.status(400).send('Webhook signature verification failed');
}
switch (event.type) {
case 'account.application.authorized': {
const account = event.data.object;
console.log('App installed by:', account.id);
// Track in your analytics system
await trackEvent('app_installed', {
account_id: account.id,
timestamp: new Date(event.created * 1000),
});
// Trigger onboarding email
await sendOnboardingEmail(account.id);
break;
}
case 'account.application.deauthorized': {
const account = event.data.object;
console.log('App uninstalled by:', account.id);
// Track churn
await trackEvent('app_uninstalled', {
account_id: account.id,
timestamp: new Date(event.created * 1000),
});
// Clean up account data
await cleanupAccountData(account.id);
break;
}
default:
console.log('Unhandled event type:', event.type);
}
res.json({ received: true });
});

Connect List API

Với các nền tảng Connect, hãy sử dụng Connect List API để lấy thông tin về các tài khoản đã cài đặt app:

const stripe = require('stripe')('sk_live_xxxxx');
// List all connected accounts with your app installed
const getInstalledAccounts = async () => {
const accounts = [];
let hasMore = true;
let startingAfter = null;
while (hasMore) {
const params = { limit: 100 };
if (startingAfter) {
params.starting_after = startingAfter;
}
const response = await stripe.accounts.list(params);
for (const account of response.data) {
// Check if your app is installed on this account
if (account.settings?.apps?.includes('com.tajo.brevo-integration')) {
accounts.push({
id: account.id,
email: account.email,
created: account.created,
});
}
}
hasMore = response.has_more;
if (response.data.length > 0) {
startingAfter = response.data[response.data.length - 1].id;
}
}
return accounts;
};

Xây Dựng Dashboard Analytics Tùy Chỉnh

Kết hợp Stripe analytics với dữ liệu của bạn để có cái nhìn toàn diện:

// Aggregate analytics for reporting
const getAppAnalytics = async (startDate, endDate) => {
const [stripeInstalls, brevoSyncStats, activationData] = await Promise.all([
// Stripe install data
getStripeInstallReport(startDate, endDate),
// Brevo sync metrics from Tajo
getBrevoSyncMetrics(startDate, endDate),
// Activation funnel from your database
getActivationFunnel(startDate, endDate),
]);
return {
// Acquisition
totalInstalls: stripeInstalls.installs,
totalUninstalls: stripeInstalls.uninstalls,
netInstalls: stripeInstalls.installs - stripeInstalls.uninstalls,
listingConversionRate: stripeInstalls.conversionRate,
// Activation
onboardingCompleted: activationData.completedOnboarding,
brevoConnected: activationData.connectedBrevo,
firstSyncCompleted: activationData.firstSyncCompleted,
activationRate: activationData.completedOnboarding / stripeInstalls.installs,
// Engagement
totalCustomersSynced: brevoSyncStats.totalCustomers,
totalEventsSynced: brevoSyncStats.totalEvents,
averageSyncFrequency: brevoSyncStats.avgSyncPerDay,
// Retention
churnRate: stripeInstalls.uninstalls / stripeInstalls.totalActive,
monthlyGrowthRate: stripeInstalls.momGrowth,
};
};

Số Liệu Chính Cần Theo Dõi

Với tích hợp Tajo Brevo, hãy tập trung vào các số liệu này:

Số LiệuMục TiêuTại Sao Quan Trọng
Tỷ lệ Cài Đặt-đến-Kích Hoạt> 70%Tỷ lệ người cài đặt hoàn thành thiết lập Brevo
Thời Gian Đến Lần Đồng Bộ Đầu Tiên< 5 phútTốc độ người dùng thấy giá trị sau khi cài đặt
Giữ Chân 30 Ngày> 80%Tỷ lệ người dùng vẫn hoạt động sau 30 ngày
Tỷ Lệ Churn Hàng Tháng< 5%Giảm thiểu gỡ cài đặt với tích hợp có giá trị
Tỷ Lệ Chuyển Đổi Listing> 15%Tỷ lệ người xem listing cài đặt
Khách Hàng Được Đồng Bộ Mỗi Tài Khoản> 100Cho thấy độ sâu sử dụng tích hợp

Tip

Thiết lập cảnh báo tự động cho các thay đổi số liệu đáng kể. Tăng đột biến trong gỡ cài đặt hoặc giảm tỷ lệ kích hoạt có thể cho thấy lỗi hoặc vấn đề UX cần được chú ý ngay lập tức.

Subscribe to updates

developer-docs

Drop your email or phone number — we'll send you what matters next.

Trợ lý AI

Xin chào! Hãy hỏi tôi về tài liệu.

Bắt đầu miễn phí với Brevo