Example
window._upstack('track', 'subscription_cancelled', {
// Standard parameters
accountId: 'acct_abc123',
subscriptionId: 'sub_def456',
planId: 'plan_pro_monthly',
mrr: 9900,
cancelReason: 'too_expensive',
cancelFeedback: 'Over budget this year',
cancelledAt: '2026-11-04T15:00:00Z',
// User data
email: 'jane@example.com',
phone: '+15551234567',
firstName: 'Jane',
lastName: 'Smith',
// Custom data
cancelAtPeriodEnd: true,
retentionOfferShown: true
});
Standard parameters
| Name | Type | Required | Example value | Description |
|---|---|---|---|---|
accountId | string | Yes | acct_abc123 | Your account or organization ID. |
subscriptionId | string | Yes | sub_def456 | Your subscription ID. |
planId | string | Yes | plan_pro_monthly | Your plan ID. |
mrr | number | No | 9900 | Monthly recurring revenue, in cents. |
cancelReason | string | No | too_expensive | Why they cancelled. |
cancelFeedback | string | No | Over budget this year | Feedback they gave when cancelling. |
cancelledAt | string | No | 2026-11-04T15:00:00Z | When the cancellation was requested, ISO 8601. |
User data
* Required if you have it.
Custom data
Examples for this event. See how custom data works.| Name | Type | Example value | Description |
|---|---|---|---|
cancelAtPeriodEnd | boolean | true | Whether it ends at the close of the billing period. |
retentionOfferShown | boolean | true | Whether a retention offer was shown. |