Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions content/docs/advanced-paywall-creation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "External Paywall Creation"

<Warning>
The legacy editor is deprecated. Please visit the docs covering our new
[editor](/paywall-editor-overview).
[editor](/dashboard/dashboard-creating-paywalls/paywall-editor-overview).
</Warning>

The following is only necessary if you're looking to build your own paywall website outside of Superwall. We strongly recommend using the paywall editor or templates instead.
Expand All @@ -24,7 +24,7 @@ There are seven different types of data tag:
| data-pw-purchase | Either primary, secondary, or tertiary. | This relates to your primary, secondary, or tertiary product set up in the Superwall dashboard respectively. When the tagged element is tapped, it tells the SDK to initialize a purchase of the specified product. |
| data-pw-open-url | A valid url. E.g.` <https://www.google.com\>.` | Normal href links do not work in a paywall. However, attaching this tag to an element opens the provided url. |
| data-pw-open-deep-link | A valid deep link url. E.g. fb://profile/33138223345. | Opens a deeplink from a button on a paywall. |
| data-pw-custom | A name for a custom action | When the tagged element is tapped, the SDK calls its delegate method handleCustomPaywallAction(withName:). The value you provide is passed to the function, from which you can perform custom logic. Check out [Custom Paywall Buttons](/docs/custom-paywall-events) for more. |
| data-pw-custom | A name for a custom action | When the tagged element is tapped, the SDK calls its delegate method handleCustomPaywallAction(withName:). The value you provide is passed to the function, from which you can perform custom logic. Check out [Custom Paywall Buttons](/sdk/guides/advanced/custom-paywall-actions) for more. |
| data-pw-skip-inner-html | true | This prevents an element's text from being edited. It tells Paywall.js to keep looking into the element's children for more data-pw-var tags. This is useful when you want to hide a whole section or edit the style of a container, rather than edit its text. |

Here are a few examples of what data tags look like in the webpage HTML:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ description: "Handle a deep link in your app and use the delegate methods."
---

After purchasing from a web paywall, the user will be redirected to your app by a deep link to redeem their purchase on device.
Please follow our [Post-Checkout Redirecting](/web-checkout-post-checkout-redirecting) guide to handle this user experience.
Please follow our [Post-Checkout Redirecting](/android/guides/web-checkout/post-checkout-redirecting) guide to handle this user experience.

<Note>
If you're using Superwall to handle purchases, then you don't need to do anything here.
</Note>

If you're using your own `PurchaseController`, you will need to update the subscription status with the redeemed web entitlements. If you're using RevenueCat, you should follow our [Using RevenueCat](/web-checkout-using-revenuecat) guide.
If you're using your own `PurchaseController`, you will need to update the subscription status with the redeemed web entitlements. If you're using RevenueCat, you should follow our [Using RevenueCat](/android/guides/web-checkout/using-revenuecat) guide.

### Using a PurchaseController

Expand Down Expand Up @@ -98,4 +98,4 @@ If you aren't using a Purchase Controller, the SDK will refresh the web entitlem

### Redeeming while a paywall is open

If a redeem event occurs when a paywall is open, the SDK will track that as a restore event and the paywall will close.
If a redeem event occurs when a paywall is open, the SDK will track that as a restore event and the paywall will close.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ After a user completes a web purchase, Superwall needs to redirect them back to

## Post-Purchase Behavior Modes

You can configure how users are redirected after checkout in your [Application Settings](/web-checkout-configuring-stripe-keys-and-settings#post-purchase-behavior):
You can configure how users are redirected after checkout in your [Application Settings](/web-checkout/web-checkout-configuring-stripe-keys-and-settings#post-purchase-behavior):

### Redeem Mode (Default)

Expand Down Expand Up @@ -49,15 +49,15 @@ You'll need to implement your own logic to handle the redirect and deep link use
Whether you're showing a checkout page in a browser or using the In-App Browser, the Superwall SDK relies on deep links to redirect back to your app.

#### Prerequisites
1. [Configuring Stripe Keys and Settings](/web-checkout-configuring-stripe-keys-and-settings)
2. [Deep Links](/in-app-paywall-previews)
1. [Configuring Stripe Keys and Settings](/web-checkout/web-checkout-configuring-stripe-keys-and-settings)
2. [Deep Links](/android/quickstart/in-app-paywall-previews)

<Warning>
If you're not using Superwall to handle purchases, then you'll need to follow extra steps to redeem the web purchase in your app.
</Warning>

- [Using RevenueCat](/web-checkout-using-revenuecat)
- [Using a PurchaseController](/web-checkout-linking-membership-to-iOS-app#using-a-purchasecontroller)
- [Using RevenueCat](/android/guides/web-checkout/using-revenuecat)
- [Using a PurchaseController](/android/guides/web-checkout/linking-membership-to-iOS-app#using-a-purchasecontroller)

---

Expand Down Expand Up @@ -134,4 +134,4 @@ class SWDelegate : SuperwallDelegate {
}
}
}
```
```
6 changes: 3 additions & 3 deletions content/docs/android/guides/web-checkout/using-revenuecat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ title: "Using RevenueCat"
description: "Handle a deep link in your app and use the delegate methods to link web checkouts with RevenueCat."
---

After purchasing from a web paywall, the user will be redirected to your app by a deep link to redeem their purchase on device. Please follow our [Post-Checkout Redirecting](/web-checkout-post-checkout-redirecting) guide to handle this user experience.
After purchasing from a web paywall, the user will be redirected to your app by a deep link to redeem their purchase on device. Please follow our [Post-Checkout Redirecting](/android/guides/web-checkout/post-checkout-redirecting) guide to handle this user experience.

<Note>
If you're using Superwall to handle purchases, then you don't need to do anything here.
</Note>

<Warning>You only need to use a `PurchaseController` if you want end-to-end control of the purchasing pipeline. The recommended way to use RevenueCat with Superwall is by putting it in observer mode.</Warning>

If you're using your own `PurchaseController`, you should follow our [Redeeming In-App](/web-checkout-linking-membership-to-iOS-app) guide.
If you're using your own `PurchaseController`, you should follow our [Redeeming In-App](/android/guides/web-checkout/linking-membership-to-iOS-app) guide.

### Using a PurchaseController with RevenueCat

Expand Down Expand Up @@ -136,4 +136,4 @@ class SWDelegate : SuperwallDelegate {

The web entitlements will be returned along with other existing entitlements in the `CustomerInfo` object accessible via RevenueCat's SDK.

If you're logging in and out of RevenueCat, make sure to resend the Stripe subscription IDs to RevenueCat's endpoint after logging in.
If you're logging in and out of RevenueCat, make sure to resend the Stripe subscription IDs to RevenueCat's endpoint after logging in.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class MyApplication : Application() {

## Superwall checks subscription status for you

Remember that the Superwall SDK uses its [audience filters](/campaigns-audience#matching-to-entitlements) for determining when to show paywalls. You generally don't need to wrap your calls to register placements with subscription status checks:
Remember that the Superwall SDK uses its [audience filters](/dashboard/dashboard-campaigns/campaigns-audience#matching-to-entitlements) for determining when to show paywalls. You generally don't need to wrap your calls to register placements with subscription status checks:

```kotlin
// ❌ Unnecessary
Expand All @@ -284,4 +284,4 @@ if (Superwall.instance.subscriptionStatus.value !is SubscriptionStatus.Active) {
Superwall.instance.register("campaign_trigger")
```

In your [audience filters](/campaigns-audience#matching-to-entitlements), you can specify whether the subscription state should be considered, which keeps your codebase cleaner and puts the "Should this paywall show?" logic where it belongs—in the Superwall dashboard.
In your [audience filters](/dashboard/dashboard-campaigns/campaigns-audience#matching-to-entitlements), you can specify whether the subscription state should be considered, which keeps your codebase cleaner and puts the "Should this paywall show?" logic where it belongs—in the Superwall dashboard.
2 changes: 1 addition & 1 deletion content/docs/configuring-a-paywall.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: "Superwall maintains a growing list of paywall templates for you to

<Warning>
The legacy editor is deprecated. Please visit the docs covering our new
[editor](/paywall-editor-overview).
[editor](/dashboard/dashboard-creating-paywalls/paywall-editor-overview).
</Warning>

On the Superwall dashboard under **Paywalls**, click **\+ New Paywall** and select **From Template**:
Expand Down
12 changes: 6 additions & 6 deletions content/docs/dashboard/dashboard-campaigns/campaign-rules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "Rules allow you to decide _which users_ see a paywall."
---

<Warning>
This page is outdated. Please visit this [one](/campaigns-audience) for the most relevant
This page is outdated. Please visit this [one](/dashboard/dashboard-campaigns/campaigns-audience) for the most relevant
information.
</Warning>
<iframe
Expand Down Expand Up @@ -36,7 +36,7 @@ description: "Rules allow you to decide _which users_ see a paywall."

### Adding Rules

Add a rule to a campaign by clicking the **Add Rule** button from within a [campaign](/docs/campaigns).
Add a rule to a campaign by clicking the **Add Rule** button from within a [campaign](/dashboard/dashboard-campaigns/campaigns).

<Frame>
![](/images/2d6a66b-Screen_Shot_2022-05-17_at_4.42.49_PM.png "Screen Shot 2022-05-17 at 4.42.49
Expand Down Expand Up @@ -65,15 +65,15 @@ Clicking on the condition reveals a dropdown of possible conditions which you ca

<Frame>![](/images/f91ba64-Screenshot_2022-12-01_at_10.55.45.png) </Frame>

Conditions are added to this list when data is retrieved from the SDK via registering events or setting user attributes. If a condition doesn't yet exist in the drop down, you can manually add it by referencing it with dot syntax. For example, `user.custom_parameter` would reference `custom_parameter` on the `user` object. As with [paywall text variables](/paywall-editor-variables), the following objects are all available to use:
Conditions are added to this list when data is retrieved from the SDK via registering events or setting user attributes. If a condition doesn't yet exist in the drop down, you can manually add it by referencing it with dot syntax. For example, `user.custom_parameter` would reference `custom_parameter` on the `user` object. As with [paywall text variables](/dashboard/dashboard-creating-paywalls/paywall-editor-variables), the following objects are all available to use:

| Object | Description |
| ------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| user | User attributes that you set via the SDK using setUserAttributes(\_:). See [Setting User Attributes](/docs/setting-user-properties) |
| params | Parameters defined when [registering an event](/docs/feature-gating). |
| user | User attributes that you set via the SDK using setUserAttributes(\_:). See [Setting User Attributes](/sdk/quickstart/setting-user-properties) |
| params | Parameters defined when [registering an event](/sdk/quickstart/feature-gating). |
| device | Device attributes that are gathered by the SDK. |

Additionally, you can use the following device properties: `device.minutesSince_X`, `device.hoursSince_X`, `device.daysSince_X`, `device.monthsSince_X`, and `device.yearsSince_X`, where X is the name of an event that you've [registered](/docs/feature-gating) or a [Superwall event](/docs/tracking-analytics). This gives you the days etc since the last occurrence of the event that you specify, excluding the event that triggered the paywall. For example, a campaign with an `app_open` event and the rule `device.daysSince_app_open > 3` will present a paywall on app open only if the last `app_open` event was over 3 days ago.
Additionally, you can use the following device properties: `device.minutesSince_X`, `device.hoursSince_X`, `device.daysSince_X`, `device.monthsSince_X`, and `device.yearsSince_X`, where X is the name of an event that you've [registered](/sdk/quickstart/feature-gating) or a [Superwall event](/sdk/guides/3rd-party-analytics/tracking-analytics). This gives you the days etc since the last occurrence of the event that you specify, excluding the event that triggered the paywall. For example, a campaign with an `app_open` event and the rule `device.daysSince_app_open > 3` will present a paywall on app open only if the last `app_open` event was over 3 days ago.

### Limit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Audiences allow you to set up simple or complex filtering rules to match certain

**Another way to think of them is this: If you're wanting to create conditions, filters or certain rules or flows that must happen to show a paywall — then you create an audience for it.**

If creating filters to show a paywall under certain conditions doesn't apply to you, then you can simply leave the default audience on — it'll match everyone who hits a [placement](/campaigns-placements).
If creating filters to show a paywall under certain conditions doesn't apply to you, then you can simply leave the default audience on — it'll match everyone who hits a [placement](/dashboard/dashboard-campaigns/campaigns-placements).

In the audience view, you can set up filtering rules, check results of experiments and recent transactions resulting from them. All of your current audiences will show in the left-hand side of the campaign details screen:

Expand Down Expand Up @@ -69,7 +69,7 @@ You can combine rules together, too. In the following example, if we only wanted
<Frame>![](/images/campaigns-audience-combo-condition.png)</Frame>

#### Using user properties or placement parameters
You can reference [user attributes](/sdk/quickstart/setting-user-properties) and [placement parameters](/docs/using-placement-parameters) in campaign filters. For example, if you were to set `hasLoggedCoffee` on your user, you could use that in a filter.
You can reference [user attributes](/sdk/quickstart/setting-user-properties) and [placement parameters](/using-placement-parameters) in campaign filters. For example, if you were to set `hasLoggedCoffee` on your user, you could use that in a filter.

**Adding user properties**
1. **Click** on Add Filter, and then click the **+** icon:
Expand Down Expand Up @@ -205,7 +205,7 @@ To change the order that Superwall evaluates audiences, simply drag and drop the

<Frame>![](/images/campaigns-reorder-audience.png)</Frame>

Remember, Superwall will check the audience at the top of the list here, and then go down one-by-one until it hits a match. These checks occur when a user hits a code path where you've registered a [placement](/campaigns-placements) or if an automatically tracked placement is triggered (i.e. something like `survey_response`).
Remember, Superwall will check the audience at the top of the list here, and then go down one-by-one until it hits a match. These checks occur when a user hits a code path where you've registered a [placement](/dashboard/dashboard-campaigns/campaigns-placements) or if an automatically tracked placement is triggered (i.e. something like `survey_response`).

### Changing audience status

Expand Down Expand Up @@ -289,4 +289,4 @@ Here's what that would look like when setting up the filter:
**Campaign B: Placement late in onboarding**<br />
And here, you'd filter by user seeds 50-99.

Even though these are filters that were set up across two entirely different campaigns, you can still define certain user audiences without creating custom placements for each of them. Using user seeds, you can easily compare the campaign results, too.
Even though these are filters that were set up across two entirely different campaigns, you can still define certain user audiences without creating custom placements for each of them. Using user seeds, you can easily compare the campaign results, too.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You'll find two main sections:
2. **Transactions:** Next, this displays any resulting transaction which occurred within the audience.

<Tip>
Note that both Recent Matches and Transactions show the [placement](/campaigns-placements) which
Note that both Recent Matches and Transactions show the [placement](/dashboard/dashboard-campaigns/campaigns-placements) which
triggered the match or transaction. This is incredibly useful in helping you gauge which actions
are resulting in conversions.
</Tip>
Expand All @@ -27,7 +27,7 @@ You can click on any user to see more details about them, including the history

<Frame>![](/images/campaigns-exp-user-details.png)</Frame>

For more on viewing users, check out this [doc](/overview-users).
For more on viewing users, check out this [doc](/dashboard/overview-users).

### Transactions

Expand Down
Loading
Loading