Developer

Test your build

Mark test-build traffic as QA, pin a test phone or test account to a variation with QA devices, and check a device's events with the device lookup.

Set qaMode: true in test builds. Pin your test phone to a variation with a QA device. Then check its events in the device lookup.

Mark test builds as QA

ts
await Apex.configure({
  publishableKey: 'apx_pk_live_…',
  shopId: 'YOUR_SHOP_ID',
  applicationId: 'com.example.shop',
  qaMode: !environment.production,
});

With qaMode: true, every event from the build is QA traffic: exposures, goals, purchases and custom events. Any environment other than production also marks events as QA.

Results hide QA traffic unless you turn on the QA toggle. Store builds use environment: 'production' and qaMode: false.

Queued events keep the QA mark they had when the app queued them, even if the option changes later.

Find the identity to register

QA devices and the device lookup use the identity the app sends to Apex:

  • Before identify(): the device ID, Apex.deviceId.
  • After identify(): the app user ID, Apex.userId.

Show the value on a debug screen in your test build, or log it:

ts
console.log('Apex identity', Apex.userId);

Pin a test phone to a variation

QA devices are available on flags with API delivery.

  1. In Apex, open Feature Flags and select the flag.
  2. In the QA devices panel, enter the Identity: the device ID, or the app user ID after login.
  3. Choose the Variation to show on that device.
  4. Optional: add a Label, for example QA iPhone 15.
  5. Set Expires after (days). The default is 14 days, the maximum is 90.
  6. Select Add QA device.

The device now gets the selected variation, and all its events count as QA traffic. Audience targeting still applies to a pinned identity. A flag can have up to 50 active QA devices.

The app picks up the pinned variation on its next assignment refresh. Bring the app back to the foreground, or call Apex.refresh().

When you conclude a flag, its QA devices no longer apply. Every device, QA devices included, gets the winner.

Check a device's events

  1. In Apex, open Analytics → Realtime.
  2. In Device lookup, enter the device ID or app user ID.
  3. Choose a time window: 15 minutes, 1 hour, 6 hours or 24 hours.

The list shows the newest events first and refreshes every 5 seconds. Each row shows the event, the flag or test, the variation, the goal, the revenue, the platform and the app version. QA events are included. New events can take a few seconds to arrive.

During a login change, exposures can still use the previous identity. Check both identities when you test a login flow.

Check events from a terminal

You can also read the same data through the API. Use a secret API key with the experiments:read permission, from a trusted terminal. Never put that key in the app.

sh
curl --get 'https://app.drip-apex.com/api/v1/tracking/verify' \
  --header "Authorization: Bearer $APEX_API_KEY" \
  --data-urlencode 'identity=<device or user id>'

The default window is 60 minutes. Add minutes (up to 1,440) and limit (1 to 200 rows) to change it. Each event includes platform, app_version, sdk_version and environment.