Skip to main content

Digia-Decided Campaigns

Everything you can set up on a campaign that Digia decides, from triggers and conditions to delays, priority and frequency, and how Digia picks what to show.

When Digia decides a campaign, you set the rule for it in the Targeting step: when it fires and who sees it. Priority, frequency and schedule are in the Delivery step. This page explains every option, and how Digia picks between campaigns.

Your developers set up the app first; see Digia as Your CEP. For a walkthrough of creating a campaign, see Create a Digia-Decided Campaign; if one doesn't show, see Why Didn't My Campaign Show?.

What you can set up​

You can only target what your app reports, so agree on the names with your developers up front. A short shared list works well:

The app providesExample namesUsed for
Screen names (setCurrentScreen)home, product_detail, cartScreen view trigger, Show on, Leaves the screen
Events and properties (trackEvent)add_to_cart with price, categoryEvent trigger and filters, cancelling a delay, {{ event.* }} copy
User attributes (setUserAttributes)city, plan, has_orderedWho sees it, {{ user.* }} copy
Anchor keys (DigiaAnchor)buy_now_buttonGuide steps, Anchor visible trigger
Slot keys (DigiaSlot)home_topInline campaigns

Screens, anchors and slots that a debug build has synced through SDK Debug Settings appear in the dashboard's pickers. You can also type a name by hand. Events and attributes appear once the app has sent them.

Triggers​

A trigger is the moment a campaign is checked. A campaign can have several; any one of them is enough.

TriggerChecked whenYour app provides
App openThe app is launched and reaches the foreground. A launch in the background (a push, a background fetch) counts when the app first comes to the foreground.Nothing
App foregroundThe app returns from the background. It doesn't fire on the launch itself, so a campaign that wants both lists both.Nothing
Screen viewYour app reports one of the chosen screens.setCurrentScreen
EventYour app tracks the chosen event and its properties match the filters (below).trackEvent
Anchor visibleA chosen guide anchor comes into view: every time, not just the first.DigiaAnchor

Event filters compare the properties sent with the event: is, is not, is one of, is not one of, contains, does not contain, >, ≥, <, ≤, is set and is not set. Filters join with AND or OR. A filter on a property the event doesn't carry doesn't match.

Who sees it​

Conditions decide which users qualify. They join with AND or OR and can be put into groups. A separate But not section excludes users who would otherwise qualify, and exclusions always win.

ConditionWhere the value comes from
User attributesetUserAttributes, or attributes imported into Digia (these need User verification).
PlatformAndroid or iOS.
OS version, App version, SDK versionThe device. Versions compare part by part, so 2.10.0 is greater than 2.9.1.
App opensHow many times the app has been launched on this device, counted by the SDK.
IdentityIdentified while a setUserId is in effect; Anonymous otherwise.
Imported audiencesAudience membership, worked out by Digia for logged-in users. Only shown when your project has audiences switched on; ask Digia to enable it.

Things worth knowing before you ship:

  • A missing value never matches, even with is not. "City is not Delhi" excludes users whose city you never sent. To include them, add "OR City is not set".
  • Attributes can be out of date. A condition such as "has never placed an order" reads an attribute your app sets or your team imports, and Digia uses the latest value it has. If Asha orders on your website, she may still see "Free delivery on your first order" until the app updates has_ordered or the next import runs.
  • App opens is per device, kept across logins, and starts counting from the first launch with a Digia SDK that runs these campaigns. "App opens = 1" therefore also matches existing users on the first launch after they update to that app version.
  • Anonymous users never see a campaign that uses audiences. Membership is fetched for a logged-in user at the start of a session, again when the app returns to the foreground after 15 minutes or more, and after every setUserId or clearUserId.

Show on​

Show on limits an overlay to specific screens. The current screen is checked when the campaign fires and, if it has a delay, again when the delay ends. On another screen at either moment, the campaign doesn't show. Leaving and coming back during the delay is fine. Inline campaigns have no Show on, since their slot already sits on one screen.

Delay​

A campaign can show immediately or after a delay of 1 second to 30 minutes. A delay can be cancelled if, before it ends, the user:

  • does an Event,
  • opens a Screen view, or
  • Leaves the screen they were on when the delay started (even if they come back before it ends).

How delays behave:

  • The delay keeps counting in the background. If it ended while the user was away, the campaign shows as soon as they return.
  • When the delay ends, everything is checked again: Who sees it, Show on, audiences and frequency caps.
  • A delay ends with the session. It's dropped if the app is killed, after 30 minutes away from the app, or when your app calls setUserId or clearUserId.
  • Each campaign has at most one delay running. A trigger that fires again during its own delay is ignored, and the first timer keeps going.
  • Delays of different campaigns run at the same time, independently.
  • Inline campaigns never wait. They show as soon as they're triggered.

Priority​

When several overlays qualify at the same moment, only the one with the highest priority shows.

LevelCriticalHighMedium (default)LowMinimal
Value1000800600400200

Campaigns can be reordered within a level. Two campaigns with exactly the same priority are decided by campaign key, the same way on every device.

Frequency and schedule​

  • Frequency cap: at most N times in total, and/or N times per session, day, week or month. Guides and surveys can also stop once completed. A show counts when the campaign is actually displayed, not when it's triggered. Counts are kept on the phone, not per person, so a second user on the same phone shares them, and clearing the app's data resets them. Day, week and month limits are rolling: 24 hours, 7 days and 30 days from the first show, not calendar periods. Inline campaigns have no frequency cap.
  • Schedule: a start and an end date and time. The campaign is only downloaded while it's within its schedule.

Personalized copy​

Campaign text can include {{ user.<attribute> }} and {{ event.<property> }}, for example Free delivery on your ₹{{ event.cart_value }} cart. The SDK fills them in when the campaign shows, from the user's attributes and the event that fired the campaign. {{ event.* }} can use the properties of the events the campaign triggers on. Each variable has a default, set in the Setup step, that's used when the value is missing.

How Digia decides what to show​

Each time a signal arrives (an app open, a screen view, an event…), the SDK runs these steps in order:

  1. Find the listeners. Only campaigns with a trigger for this signal are considered, and an Event trigger's filters must match.
  2. Check eligibility. Who sees it must be true, audiences must allow the user, an overlay must be under its frequency cap, and an overlay with Show on must be on one of its screens.
  3. Sort the eligible campaigns into three groups:
    • Inline campaigns. Each slot gets its highest-priority campaign, at once. Every slot is filled independently, alongside any overlay.
    • Overlays with a delay. Each one starts its own timer. When a timer ends, the campaign is checked again and competes with whatever else is due at that moment.
    • Overlays without a delay. The highest-priority one is the winner.
  4. Show the winner, unless another overlay is already on screen or campaigns are suppressed. Only one overlay is on screen at a time.

The overlays that didn't win, or found the screen busy, are not queued. They're dropped for this moment and can show at their next matching trigger.

A worked example​

Asha, logged in, city Pune, opens the app for the 7th time. Four campaigns trigger on App open:

CampaignTypePriorityWho sees it
Welcome tourGuideCriticalApp opens = 1
Diwali saleNudgeHighCity is one of Pune, Mumbai
Rate usNudgeMediumApp opens ≥ 5
Home bannerInline, slot home_topMediumEveryone
  1. Welcome tour isn't eligible: this is her 7th open.
  2. Diwali sale and Rate us both qualify. Diwali sale has the higher priority, so it shows. Rate us is held back, not queued; it can show on her next app open.
  3. Home banner fills the home_top slot at once. Inline campaigns don't compete with overlays.

Later, on a product page, "Talk to a pharmacist" starts a 20-second delay that's cancelled by add_to_cart. If Asha adds the product to her cart after 12 seconds, the delay is cancelled. If she just keeps reading, the campaign is checked again at 20 seconds. It shows if Diwali sale is closed, and is dropped if Diwali sale is still on screen.

Timing and lifecycle​

  • Campaigns download at every app start. New campaigns, edits and pauses reach a device the next time the app starts. A campaign whose schedule ends while the app is open can still fire until the app restarts.
  • An app started offline shows no Digia-decided campaigns until its next start with a connection. Campaigns aren't kept on the device between launches.
  • Signals aren't lost while campaigns load. App opens, screen views and events from the first moments are held for up to 10 seconds and replayed with their original times, so a 20-second delay that started on the first screen still counts from that moment. They're dropped if loading fails, takes longer than 10 seconds, or the app goes to the background first.
  • A slot drawn before campaigns arrive is filled when they arrive.
  • Only active campaigns run. A campaign left in draft, paused or archived never fires.
  • A session ends after 30 minutes away from the app, or when the user changes. Ending a session drops pending delays and resets per-session frequency caps.