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 Activation Opportunities
    • 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
  • Dynamically Hiding The Banner
  • Capturing Context
  • Logging Conversions
  • Multivariate Monetization

Was this helpful?

  1. Discover By Use Cases

Inline Banners

Learn how to properly log conversions for ad banners and offers that are embedded in the UI.

PreviousMultivariate MonetizationNextGlossary

Last updated 27 days ago

Was this helpful?

Apps often have inline elements — whether in the form of monetized ad banners, a card promoting a feature, or a discount offer, etc. — that blends in in the UI, without interrupting users like pop ups do. The challenge with logging conversions for these inline elements is that they not always have clear "outcomes", as users might simply never interact with them. Here is where Alternative Outcomes really come in handy.

Dynamically Hiding The Banner

In this section, let's use the example of an inline banner upselling a subscription that shows up while the user is scrolling a feed, like this:

The goal is to prevent the banner from being displayed when users are unlikely to interact with it.

Capturing Context

The right moment to capture the context is when you're about to present it. In this case of a scrolling view, it should be right before it gets rendered on the screen.

Logging Conversions

After capturing the context, check the context's shouldUpsell property to see if your banner should be displayed or not. If not, log skipped, as usual. If it ends up being displayed, you'll need to log different types of outcomes, depending on the user's interactions:

  • negativeNotInteracted: at a suitable later point, such as when the user closes the app or exits the screen displaying the banner. In our example, it will be when the user scrolls past the banner and the banner gets un-rendered.

    To handle this, use the context.logIfNotLoggedYet method, e.g.:

    func applicationDidEnterBackground(_ application: UIApplication) {
        guard let context = ContextManager.recentContext(flowName: "onboarding_upsell") else { return }
        context.logIfNotLoggedYet(.negativeNotInteracted)
    }
  • positiveInteracted: when the user taps on the banner or its CTA, opening its paywall, for instance.

  • negativeDismissed: when the user clicks on the 🅧 button to remove the banner from the screen.

  • negative: when the user dismisses the paywall (they clicked because they were curious but didn’t purchase anything and dismissed it).

  • positive: when the user purchases something inside the paywall. Log this using Revenue Outcomes.

Multivariate Monetization

If your app is using a Multivariate Monetization strategy, the only point of attention is that when shouldUpsell is false , instead of logging skipped and exiting early, you will present the ad banner and log the outcomes as explained in the section above Logging Conversions.

Before logging your outcome, don't forget to log which path your app ended up taking by using a Custom Outcome Metadata, such as "path": "ad" and "path": "paywall".

For more information, see Multivariate Monetization.

Visit if you need a refresher on how to capture context.

Capturing Context