LogoLogo
SDK ReferenceChangelogBlogStatusGet HelpGo To Dashboard
  • Introduction
  • Basics
    • How ContextDecision Works
    • How ContextPush Works
    • Getting Started
  • Context Decision
    • Logging Conversions
    • Revenue Outcomes
      • Logging Revenue with RevenueCat
    • Adding Entry Points
    • Release Checklist
    • Advanced
      • Custom Signals
      • Alternative Outcomes
      • Custom Outcome Metadata
      • Listening for Good Moments
      • Model Distribution Methods
      • Custom A/B Test Segmentation
      • Analytics & Reporting
  • Context Push
    • Integrating ContextPush
    • Push Notification Providers
      • OneSignal
      • Customer.io
      • Simple Web Request
    • Release Checklist
    • Analytics & Reporting
  • Discover By Use Cases
    • Multivariate Monetization
    • Inline Banners
  • Other Information
    • Glossary
    • Updating Your SDK
    • Minimum SDK Requirements
    • FAQ
    • Get Help
    • Changelog
  • Advanced
    • Custom Configuration
    • Capturing Context In Key Moments
Powered by GitBook
On this page

Was this helpful?

  1. Context Decision

Release Checklist

Validate your ContextDecision integration before releasing to the App Store or Google Play with this checklist.

PreviousAdding Entry PointsNextAdvanced

Last updated 18 days ago

Was this helpful?

Before you ship your first release with the ContextSDK, we recommend taking a few steps to validate the integration works as expected.

1

Validate the Context

  1. Add the following log right after wherever you object:

print(context.validate())
Log.d("ContextSDK", context.validate())
Log.d("ContextSDK", context.validate());
print(await context.validate());
Debug.Log(context.Validate());
const output = await context.validate();
console.log(output); // Or print it anywhere else
  1. Run your app on a physical device, not on a simulator or emulator.

  2. Navigate to the screen where you access ContextSDK. Make sure all the requirements you've implemented in your app are met (e.g. the user has not purchased the product, the user has not seen the upsell before, etc.).

  3. You should see the following output printed, with the numbers varying depending on the current context:

βœ… Number of Signals: 262 (this number may be higher)
βœ… Flow name provided: your_flow_name
βœ… Accelerometer Data: Valid
πŸ‘‰ Signal Sample 1: 0.0 (if your device was flat on the table not moving, this should be 0.0)
πŸ‘‰ Signal Sample 2: 0.0059286836 (this should never be exactly 0.0)
βœ… Calibration Mode active
βœ… ContextSDK License: Active
πŸ‘‰ ContextSDK Version: 5.5.0
  1. If you notice the ContextSDK version not being 5.5.0, please follow the instructions in Updating Your SDK.

2

Verify each flow has a unique name

Each flow should have a distinct name, even if the same flow is triggered from different parts of the app. We automatically analyze the overlap between different flows, to decide if there should be one, or more models.

Best practice: use snake_case and group flows that lead to the same prompt using the same prefix, e.g. upsell_onboarding, upsell_first_action .

3

Verify the moment you are capturing context and logging outcome

It is critical that you capture the context object right before you show the upsell prompt. This guarantees that the signals are taken at the correct moment (as context can change quickly), and also allows you to start making decisions once your custom model is ready.

Similarly, you should log the outcome after the user has interacted with the upsell prompt.

Failing to follow these guidelines will likely show console warnings, such as a message indicating that you’re logging an outcome immediately after creating the context, as this approach is generally considered incorrect.

4

Verify you are correctly logging all outcome scenarios

You need to ensure you always log at least one outcome for each time you access the current context:

Also, make sure both positive and negative code paths are tested before releasing your app. Forgetting to log one or the other usually invalidates the data collected and delays the training of your custom model.

We recommend logging .positive only after the user successfully completes a purchase.

If the user dismisses the iOS payment sheet or encounters a transaction error (e.g., due to network issues), avoid logging an outcome immediately. Instead, log a new Custom Outcome Metadata and allow the user to retry (e.g., by keeping the paywall screen open after a payment error). Log the final outcome later, such as when the user either dismisses the paywall or successfully completes the purchase.

Alternatively, you can be more fine-grained with your logging and use Alternative Outcomes.

When logging outcome metadata, be sure to call context.log(…) afterward. The metadata is transmitted to the server only when an outcome is logged.

Also, avoid logging multiple outcomes for the same context without updating metadata between them. For example, if a user dismisses the upsell prompt, logging a .negative outcome repeatedly without changing metadata isn’t necessary. Update the metadata between each outcome, or log the outcome only once.

5

Ensure no errors are logged by the SDK

When running your app with ContextSDK installed on a real device, ensure that your IDE doesn't print out any ContextSDK-related errors (search console logs for "ContextSDK").

capture the context