Pular para o conteúdo

Custom events examples for subscription management

Este conteúdo ainda não está disponível no seu idioma.

Suggested events for subscription management, each with recommended attributes and code samples. To send an event from your app, see Send custom events from your app. To use these events in segments and journeys, see industry playbooks.

Anchor link to

Send this event when a user has bought a paid subscription plan.

Recommended attributes:

  • subscription_plan_name: String
  • price: decimal (price)
  • currency:String
  • expiry_date:Date
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Paid subscription purchase", {
"subscription_plan_name": "string value",
"price": 49.99,
"currency": "string value",
"expiry_date": new Date()
});
});

Subscription renewal

Anchor link to

Trigger this event once a user renews their subscription plan.

Recommended attributes:

  • subscription_plan_name: String
  • price: decimal (price)
  • currency: String
  • renewal_count: Integer
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Subscription renewal", {
"subscription_plan_name": "string value",
"price": 49.99,
"currency": "string value",
"renewal_count": 1
});
});

Free trial started

Anchor link to

Trigger this event when a user chooses to start a free trial before getting a subscription.

Recommended attributes:

  • free_trial_name: String
  • expiry_date: Date
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Free trial started", {
"free_trial_name": "string value",
"expiry_date": new Date()
});
});

Subscription canceled

Anchor link to

Use this event to track in-app subscription cancelations.

// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Subscription canceled", {});
});

Conversion from Free to Paid

Anchor link to

Trigger this event once a user converts from using your app for free to a paid subscription plan.

Recommended attributes:

  • subscription_plan_name: String
  • price: decimal (price)
  • currency: String
  • date: Date
// To use with Web Push SDK, you can integrate this code:
const Pushwoosh = window.Pushwoosh || [];
Pushwoosh.push(function(api) {
api.postEvent("Conversion from Free to Paid", {
"subscription_plan_name": "string value",
"price": 49.99,
"currency": "string value",
"date": new Date()
});
});