Skip to main content

Dashboard vs. Code

AppDNA splits responsibility between the Console (UI configuration) and your code (SDK calls). Many features require zero code — the SDK handles them automatically based on what you configure in the Console.

Quick Reference

FeatureConsoleYour Code
PaywallsDesign layout, plans, CTA, publishAppDNA.paywall.present("id")
Onboarding flowsDesign steps, branching rules, publishAppDNA.onboarding.present()
ExperimentsCreate, set variants, allocate trafficAppDNA.experiments.getVariant("id")
Feature flagsCreate flag, toggle on/offAppDNA.features.isEnabled("flag")
Remote configSet key-value pairsAppDNA.remoteConfig.getString("key")
In-app messagesDesign message, set triggers, publishNone — fully automatic
SurveysDesign survey, set triggers, publishNone — automatic (or present manually)
Push notificationsCreate campaigns in RetentionAppDNA.setPushToken() + register
Deep linksConfigure routesAppDNA.deepLinks.checkDeferred()
Event trackingAppDNA.track("event", properties)
User identityAppDNA.identify(userId, traits)
BillingLink store products to plansAppDNA.billing.purchase("productId")
Web entitlementsStripe integration in SettingsAutomatic after identify()

What’s Automatic (Zero Code)

The SDK tracks these events automatically. You do not need to call track() for any of them.

Session & Lifecycle

  • session_start, session_end, app_open, app_close

Onboarding

  • Flow started, step viewed, step completed, step skipped, flow completed, flow dismissed

Paywalls

  • Paywall presented, actions, dismissed, purchase started/completed/failed

Billing

  • Purchase started, completed, failed, canceled, restore started/completed

Push

  • Token registered, permission granted/denied, delivered, tapped

Experiments

  • Exposure tracked once per session on first getVariant() call

In-App Messages

  • Message presented, action taken, dismissed

Surveys

  • Survey presented, response submitted, dismissed
For the full list of auto-tracked events with their properties, see the Auto-Tracked Events reference.

Callbacks — When You Want to React

Every SDK module provides a delegate or callback interface so you can respond to events in your own code. Common scenarios:
// Unlock premium after paywall purchase
func onPaywallPurchaseCompleted(paywallId: String, productId: String, transaction: TransactionInfo) {
    unlockPremium()
    navigateToHome()
}

// Capture onboarding answers for personalization
func onOnboardingCompleted(flowId: String, responses: [String: Any]) {
    AppDNA.identify(userId: currentUserId, traits: responses)
}

// Route user from push notification tap
func onPushTapped(notification: PushPayload, actionId: String?) {
    if let action = notification.action {
        navigate(to: action.value)
    }
}

// React to survey feedback
func onSurveyResponseSubmitted(surveyId: String, responses: [SurveyAnswer]) {
    if let nps = responses.first, nps.numericValue ?? 0 < 7 {
        showSupportLink()
    }
}
Each module’s documentation includes the full delegate reference and examples. See:

Paywalls

PaywallDelegate — purchase, dismiss, action callbacks

Onboarding

OnboardingDelegate — step, completion, response callbacks

Billing

BillingDelegate — purchase, restore, entitlement callbacks

Surveys

SurveyDelegate — presentation, response, dismiss callbacks