Skip to content

Commit 596beeb

Browse files
committed
Merge branch 'ADP-5297' into develop
2 parents 5bf4bcd + e281db0 commit 596beeb

31 files changed

Lines changed: 583 additions & 97 deletions

docusaurus.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ const config = {
358358
],
359359

360360
plugins: [
361-
require('./plugins/cookie-checker-plugin'),
361+
// Temporarily disabled - comment out to prevent AskAI widget
362+
// require('./plugins/cookie-checker-plugin'),
362363
require.resolve('./plugins/custom-meta-plugin.js'),
363364
// Webpack plugin for Node.js polyfills
364365
webpackPlugin,

public/js/cookie-checker.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
(function() {
55
'use strict';
66

7+
// Temporarily disabled - skip entire script execution
8+
return;
9+
710
// Function to get cookie value by name
811
function getCookie(name) {
912
const value = `; ${document.cookie}`;
@@ -21,9 +24,10 @@
2124
window.frontChatInitialized = true;
2225

2326
// Create custom Ask AI button after Front Chat is initialized
24-
setTimeout(() => {
25-
createCustomAskAIButton();
26-
}, 1000);
27+
// Temporarily disabled
28+
// setTimeout(() => {
29+
// createCustomAskAIButton();
30+
// }, 1000);
2731
}
2832
}
2933

src/js/cookie-checker.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
(function() {
55
'use strict';
66

7+
// Temporarily disabled - skip entire script execution
8+
return;
9+
710
// Function to get cookie value by name
811
function getCookie(name) {
912
const value = `; ${document.cookie}`;
@@ -21,9 +24,10 @@
2124
window.frontChatInitialized = true;
2225

2326
// Create custom Ask AI button after Front Chat is initialized
24-
setTimeout(() => {
25-
createCustomAskAIButton();
26-
}, 1000);
27+
// Temporarily disabled
28+
// setTimeout(() => {
29+
// createCustomAskAIButton();
30+
// }, 1000);
2731
}
2832
}
2933

versioned_docs/version-3.0/android-handling-events.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ The method will not be invoked in Observer mode. Refer to the [Android - Present
173173

174174
#### Failed purchase
175175

176-
If purchase fails, this method will be invoked:
176+
If a purchase fails due to an error, this method will be invoked. This includes Google Play Billing errors (payment restrictions, invalid products, network failures), transaction verification failures, and system errors. Note that user cancellations trigger `onPurchaseFinished` with a cancelled result instead, and pending payments do not trigger this method.
177177

178178
```kotlin showLineNumbers title="Kotlin"
179179
public override fun onPurchaseFailure(
@@ -209,6 +209,63 @@ public override fun onPurchaseFailure(
209209

210210
The method will not be invoked in Observer mode. Refer to the [Android - Present Paywall Builder paywalls in Observer mode](android-present-paywall-builder-paywalls-in-observer-mode) topic for details.
211211

212+
#### Finished web payment navigation
213+
214+
This method is invoked after an attempt to open a [web paywall](web-paywall.md) for a specific product. This includes both successful and failed navigation attempts:
215+
216+
```kotlin showLineNumbers title="Kotlin"
217+
public override fun onFinishWebPaymentNavigation(
218+
product: AdaptyPaywallProduct?,
219+
error: AdaptyError?,
220+
context: Context,
221+
) {}
222+
```
223+
224+
**Parameters:**
225+
226+
| Parameter | Description |
227+
|:------------|:---------------------------------------------------------------------------------------------------|
228+
| **product** | An `AdaptyPaywallProduct` for which the web paywall was opened. Can be `null`. |
229+
| **error** | An `AdaptyError` object if the web paywall navigation failed; `null` if navigation was successful. |
230+
231+
<Details>
232+
<summary>Event examples (Click to expand)</summary>
233+
234+
```javascript
235+
// Successful navigation
236+
{
237+
"product": {
238+
"vendorProductId": "premium_monthly",
239+
"localizedTitle": "Premium Monthly",
240+
"localizedDescription": "Premium subscription for 1 month",
241+
"localizedPrice": "$9.99",
242+
"price": 9.99,
243+
"currencyCode": "USD"
244+
},
245+
"error": null
246+
}
247+
248+
// Failed navigation
249+
{
250+
"product": {
251+
"vendorProductId": "premium_monthly",
252+
"localizedTitle": "Premium Monthly",
253+
"localizedDescription": "Premium subscription for 1 month",
254+
"localizedPrice": "$9.99",
255+
"price": 9.99,
256+
"currencyCode": "USD"
257+
},
258+
"error": {
259+
"code": "web_navigation_failed",
260+
"message": "Failed to open web paywall",
261+
"details": {
262+
"underlyingError": "Browser unavailable"
263+
}
264+
}
265+
}
266+
```
267+
</Details>
268+
212269
#### Successful restore
213270

214271
If restoring a purchase succeeds, this method will be invoked:

versioned_docs/version-3.0/autopilot.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ If the analysis doesn't start, it may be due to one of the following reasons:
6565
- Your top-performing paywall has two or more products with the same period.
6666
:::
6767

68-
2. We automatically detect your top-performing placement based on revenue data. If you'd like to analyze a different placement, select one from the **Placement** dropdown. Then, click **Analyze this placement**. After that, Adapty will need some time to analyze your app, but don't leave the page – it won't take long.
68+
2. Adapty automaticaly selects the top-performing placement based on revenue data. If you'd like to analyze a different placement, select one from the **Placement** dropdown. Then, click **Analyze this placement**. After that, Adapty will need some time to analyze your app, but don't leave the page – it won't take long.
6969
<Zoom>
7070
<img src={require('./img/select-placement.webp').default}
7171
style={{
@@ -77,12 +77,12 @@ If the analysis doesn't start, it may be due to one of the following reasons:
7777
/>
7878
</Zoom>
7979

80-
3. At this stage, we will detect your top-performing paywall. Review the paywall information and click **Proceed to competitors research**.
80+
3. Adapty automatically selects the top-performing live paywall for analysis. If you wish to analyze a different paywall, click the **Change Paywall** button, and pick another option. You can only select a paywall added to the placement from the previous step.
8181

82-
Note that we select your top-performing paywall only among **live** paywalls. If your successful paywall is not added to any placement currently, it won't be considered.
82+
Review the paywall data: products, conversion metrics, the revenue distribution chart. When you're ready to proceed to the next step, click **Go to competitors research**.
8383

8484
<Zoom>
85-
<img src={require('./img/app-analysis.webp').default}
85+
<img src={require('./img/autopilot-select-paywall.webp').default}
8686
style={{
8787
border: '1px solid #727272', /* border width and color */
8888
width: '700px', /* image width */
@@ -92,10 +92,10 @@ If the analysis doesn't start, it may be due to one of the following reasons:
9292
/>
9393
</Zoom>
9494

95-
4. Confirm your competitors we've detected, or add some manually using their links from the App Store. Then, click **Generate report**.
96-
97-
We recommend focusing on apps with higher MRR that you have.
95+
4. Adapty suggests a list of up to 5 competitors for analysis. They are chosen based on your app's category and MRR. You can modify the list, and manually add applications with an App Store link. We recommend selecting apps with higher MRR than yours.
9896

97+
Click **Generate report** to confirm the list of competitors.
98+
9999
<Zoom>
100100
<img src={require('./img/competitors.webp').default}
101101
style={{
@@ -139,7 +139,7 @@ If the analysis doesn't start, it may be due to one of the following reasons:
139139

140140
Once your recommendations are ready, it’s time to put them into action.
141141

142-
Your plan consists of three parts: setting new prices, updating paywalls, and conducting A/B tests with them. After each round, the winning strategy will advance to the next round. The winner of the final round will be your most efficient pricing option. Based on our estimates, completing the entire test cycle could increase your revenue by up to 80%.
142+
Your plan consists of several parts that include setting new prices, updating paywalls, and conducting A/B tests with them. After each round, the winning strategy will advance to the next round. The winner of the final round will be your most efficient pricing option. Based on our estimates, completing the entire test cycle could increase your revenue by up to 80%.
143143

144144
To start with the first stage:
145145

@@ -177,4 +177,4 @@ For a detailed look at how Autopilot analyzes your growth strategy and which dat
177177
margin: '0 auto' /* center alignment */
178178
}}
179179
/>
180-
</Zoom>
180+
</Zoom>

versioned_docs/version-3.0/capacitor-handling-events.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -245,18 +245,18 @@ Some event handlers have a default behavior that you can override if needed:
245245

246246
| Event handler | Description |
247247
| :-------------------------- |:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
248-
| **onCustomAction** | If a user performs some custom action, e.g. clicks a [custom button](paywall-buttons), this method will be invoked. |
249-
| **onUrlPress** | If a user clicks a URL in your paywall, this method will be invoked. |
250-
| **onAndroidSystemBack** | If a user taps the system Android **Back** button, this method will be invoked. |
251-
| **onCloseButtonPress** | If the close button is visible and a user taps it, this method will be invoked. It is recommended to dismiss the paywall screen in this handler. |
252-
| **onPurchaseCompleted** | If the purchase succeeds, the user cancels their purchase, or the purchase appears to be pending, this method will be invoked. In case of a successful purchase, it will provide an updated `AdaptyProfile`. |
253-
| **onPurchaseStarted** | If a user taps the "Purchase" action button to start the purchase process, this method will be invoked. |
254-
| **onPurchaseCancelled** | If a user initiates the purchase process and manually interrupts it, this method will be invoked. |
255-
| **onPurchaseFailed** | If the purchase process fails, this method will be invoked and provide `AdaptyError`. |
256-
| **onRestoreStarted** | If a user starts a purchase restoration, this method will be invoked. |
257-
| **onRestoreCompleted** | If a user's purchase restoration succeeds, this method will be invoked and provide an updated `AdaptyProfile`. It is recommended to dismiss the screen if the user has the required `accessLevel`. Refer to the [Subscription status](capacitor-listen-subscription-changes) topic to learn how to check it. |
258-
| **onRestoreFailed** | If the restoring process fails, this method will be invoked and will provide `AdaptyError`. |
259-
| **onProductSelected** | When any product in the paywall view is selected, this method will be invoked, so that you can monitor what the user selects before the purchase. |
260-
| **onRenderingFailed** | If an error occurs during view rendering, this method will be invoked and provide `AdaptyError`. Such errors should not occur, so if you come across one, please let us know. |
261-
| **onLoadingProductsFailed** | If you haven't set `prefetchProducts: true` in view creation, AdaptyUI will retrieve the necessary objects from the server by itself. If this operation fails, this method will be invoked and provide `AdaptyError`. |
248+
| **onCustomAction** | Invoked when a user performs a custom action, e.g., clicks a [custom button](paywall-buttons). |
249+
| **onUrlPress** | Invoked when a user clicks a URL in your paywall. |
250+
| **onAndroidSystemBack** | Invoked when a user taps the system Android **Back** button. |
251+
| **onCloseButtonPress** | Invoked when the close button is visible and a user taps it. It is recommended to dismiss the paywall screen in this handler. |
252+
| **onPurchaseCompleted** | Invoked when the purchase completes, whether successful, cancelled by user, or pending approval. In case of a successful purchase, it provides an updated `AdaptyProfile`. User cancellations and pending payments (e.g., parental approval required) trigger this event, not `onPurchaseFailed`. |
253+
| **onPurchaseStarted** | Invoked when a user taps the "Purchase" action button to start the purchase process. |
254+
| **onPurchaseCancelled** | Invoked when a user initiates the purchase process and manually interrupts it (cancels the payment dialog). |
255+
| **onPurchaseFailed** | Invoked when a purchase fails due to errors (e.g., payment restrictions, invalid products, network failures, transaction verification failures). Not invoked for user cancellations or pending payments, which trigger `onPurchaseCompleted` instead. |
256+
| **onRestoreStarted** | Invoked when a user starts a purchase restoration process. |
257+
| **onRestoreCompleted** | Invoked when purchase restoration succeeds and provides an updated `AdaptyProfile`. It is recommended to dismiss the screen if the user has the required `accessLevel`. Refer to the [Subscription status](capacitor-listen-subscription-changes) topic to learn how to check it. |
258+
| **onRestoreFailed** | Invoked when the restore process fails and provides `AdaptyError`. |
259+
| **onProductSelected** | Invoked when any product in the paywall view is selected, allowing you to monitor what the user selects before the purchase. |
260+
| **onRenderingFailed** | Invoked when an error occurs during view rendering and provides `AdaptyError`. Such errors should not occur, so if you come across one, please let us know. |
261+
| **onLoadingProductsFailed** | Invoked when product loading fails and provides `AdaptyError`. If you haven't set `prefetchProducts: true` in view creation, AdaptyUI will retrieve the necessary objects from the server by itself. |
262262

versioned_docs/version-3.0/flutter-handle-paywall-actions.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ This guide shows how to handle custom and pre-existing actions in your code.
2525
To add a button that will close your paywall:
2626

2727
1. In the paywall builder, add a button and assign it the **Close** action.
28-
2. In your app code, implement a handler for the `close` action that dismisses the paywall.
28+
2. In your app code, implement a handler for the `CloseAction` and `AndroidSystemBackAction` actions.
29+
30+
:::info
31+
In the Flutter SDK, the `CloseAction` and `AndroidSystemBackAction` actions trigger closing the paywall by default. However, you can override this behavior in your code if needed. For example, closing one paywall might trigger opening another.
32+
:::
2933

3034
<Tabs groupId="presentation-method" queryString>
3135
<TabItem value="standalone" label="Standalone screen" default>

0 commit comments

Comments
 (0)