Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.appstack.tech/llms.txt

Use this file to discover all available pages before exploring further.

Use Cursor, Claude Code, or another AI to help you implement the Superwall integration with Appstack.

Open in Cursor
With the Superwall integration, you can:
  1. Use Superwall in-app events to run enhanced app campaigns.
  2. Unlock attribution-based paywall optimization.
To successfully connect Superwall, you must:
  1. Have Owner/Admin access to an Appstack organization.
  2. Have access to the correct Superwall account.

Connect to Superwall

Follow the steps to ensure the Superwall integration works:
1

SDK configuration

To successfully receive the Appstack ID, use the following line after the calls to Superwall and Appstack configure methods:
// Use Superwall SDK version >= 4.12.11

Superwall.shared.setIntegrationAttribute(
  IntegrationAttribute.appstackId,
  AppstackAttributionSdk.shared.getAppstackId(),
);
And to show paywalls based on where your users came from (paid ads), you only need to add a single line of code before your first Superwall.register call to pass Appstack’s parameters as user attributes. That’s it, there’s no need to repeat it for every placement:
Learn more about how to use ad campaign data to show personalized paywalls and increase subscription revenue by reading this article.
Task {
	Superwall.shared.setUserAttributes(
		await AppstackAttributionSdk.shared.getAttributionParams() ?? [:]
	)
}

// Now, your placements will attach those user attributes, making
// them available for use in campaign filters.
Superwall.shared.register(placement: "onboarding_paywall")
2

Copy the credentials

  1. In Appstack, from the side menu, select Integrations > Superwall.
  2. Copy the access token.
  3. Copy the app ID.
3

Paste the credentials

  1. In Superwall, from the side menu, select Integrations > Appstack.
  2. Paste the access token.
  3. Paste the app ID.
Information
  1. After the integration is active on Superwall’s platform, it can take 30-60 minutes to appear as active on Appstack’s side.
  2. It’s recommended not to edit or modify the integration on Superwall’s platform to avoid attribution issues.
The integration will show an error if less than 50% of events received over the last 24 hours include an appstackId. When this threshold is not met, these events cannot be used in ad network integration pages.

List of events

Below is a list of events you can forward to ad networks to optimize your campaigns.
NameDefinition
sw_trial_startedFired when a user begins a free trial. Triggered on the initial purchase when the period type is TRIAL.
sw_trial_qualifiedFired when a free trial is still active two hours after it started — meaning the user did not cancel within the qualification window.
sw_trial_convertedFired when a free trial successfully converts to a paid subscription. This happens on the first renewal after the trial period ends.
sw_intro_startedFired when a user begins an intro offer — a paid trial at a discounted price (e.g., $0.99 for the first week). Triggered on the initial purchase when the period type is INTRO
sw_trial_intro_startedFired when either a free trial starts (sw_trial_started) or an intro offer starts (sw_intro_started). The event triggers as soon as at least one of these conditions is met.
sw_trial_intro_qualifiedFired when either a free trial qualifies (sw_trial_qualified) or or an intro offer starts (sw_intro_started). The event triggers as soon as at least one of these conditions is met.
sw_initial_purchaseFired when any of the following occur: a free trial starts (sw_trial_started), an intro offer starts (sw_intro_started), or a full-price subscription starts (sw_subscription_started). The event triggers as soon as at least one of these conditions is met.
sw_initial_purchase_qualifiedFired when any of the following occur: a trial qualified happens (sw_trial_qualified), an intro offer starts (sw_intro_started), or a full-price subscription starts (sw_subscription_started). The event triggers as soon as at least one of these conditions is met.
sw_subscription_startedFired when a user starts a paid subscription at full price, with no trial or intro offer involved. Triggered on the initial purchase when the period type is NORMAL
sw_subscription_renewedFired on each successful renewal of an active subscription. Indicates the user was billed again and remains subscribed for another period.
sw_non_renewing_purchaseFired when a user makes a one-time, non-subscription purchase — any product that is not an auto-renewing subscription (e.g., consumables or non-consumable in-app purchases). Unlike subscription events, this purchase does not renew automatically.

Use Cursor, Claude Code, or another AI to validate your existing Superwall + Appstack integration.

Open in Cursor