darkcore docs
PWAStreams

Traffic distribution

Rules for routing traffic to a PWA, Direct Link, or Landing, plus tracking links to an offer.

The Traffic distribution section has two blocks: rules select a PWA, Direct Link, or Landing for traffic, while tracking links select the offer. Both are evaluated top to bottom, first match wins, and use the same filter set.

Traffic distribution section
Traffic distribution: rule list plus tracking links

Display rules

Each rule has match conditions (which traffic it catches) and route variants (what it shows). Drag rules to change priority.

Rule editing modal
Edit Rule: route variants on the left, match conditions on the right

Match conditions

All conditions are combined with AND. An empty condition means the signal is ignored.

ConditionFormatExample
Operating systemAndroid / iOS / Windows / macOS / LinuxAndroid
CountryISO alpha-2 code (2 uppercase letters)BR, US, IN
LanguageBCP-47 (en or en-US)pt, uk
Device typemobile / tablet / desktopmobile

Sub filter (sub key)

Cloak by a secret value in sub1…sub10, for example a value passed through an ad campaign's {{adset.name}}. There are three settings:

SettingOptionsDefault
Sub keyAny sub plus sub1…sub10Any sub
OperatorEquals / Does not equal / Starts with / Contains any from listEquals any from list
ValuesOne value per line (1–50 values, up to 256 characters)—

One rule supports up to 10 sub-key filters. “Any sub” matches when any of sub1…sub10 satisfies the operator.

Route variants

Every variant leads to one of three targets:

TargetWhat the user sees
PWAThe landing and installation flow of the selected PWA
Direct LinkThe configured direct-link flow
LandingA standalone page from the Landings library
  • one variant — a direct route;
  • several weighted variants — A/B/C distribution. Weight is a non-negative integer; the percentage is calculated automatically. At least one variant must have a non-zero weight.

The rule only selects the target. It does not change PWA behavior or pass PWA settings to the Traffic Engine. Configure the iOS flow, push prompt, and webview in the PWA or Direct Link respectively.

A PWA or Direct Link variant can have a pre-landing page and a post-landing page:

FieldDescription
Pre-landingPage before the main target. Action after pre-landing determines what happens next
Post-landingPage after it. Includes a Show once per user switch

A standalone Landing is already the final page, so it cannot have a prelanding or postlanding in the same variant.

Catch-all rule

A rule without any filters catches all traffic that did not match earlier rules: this is the catch-all. Place it at the bottom of the list.

Rule list with catch-all warning
Warning: a catch-all above filtered rules leaves sub-key traffic unprotected

If a catch-all is above filtered rules with sub keys, all traffic lands on the catch-all and sub-key protection works only for the filtered branches. Keep the catch-all last.

Tracking links determine where conversion traffic goes after installation. They are matched by the same filters; first match wins.

Tracking link edit modal
Edit Track Link: target URLs (library offer or inline) plus match conditions

Target URLs

Each variant is one of two options (icon switcher):

  • a library offer — select an offer with Active status;
  • an inline target URL — enter it manually; placeholder: https://tracker.com/?click_id={click_id}.

The URL field has a macro insertion button. Add {click_id}, {sub1}, {geo}, and more:

https://cpa-network.com/click?offer_id=123&subid={click_id}

Several weighted variants create a split test of multiple offers on the same traffic.

Always pass {click_id} in the offer URL. This is the value the tracker returns in the incoming postback, and it is the only way to match a conversion to a click.

Match conditions here are identical to rule conditions (OS, country, language, device type, sub key). Empty filters make a tracking link a catch-all, so keep it at the bottom. See the full macro reference.

On this page