How it works without Apex
Create an experiment in Apex with randomization_unit set to person, call identify(userId, traits) on login in both your web app (@apex-inc/sdk) and mobile SDK, and optionally sign browser calls with HMAC userHash. Apex assigns the same arm across every device a signed-in person uses, collapses multiple devices back to one canonical subject key (contact:<id>) in results, and keeps staging traffic isolated automatically.
How Apex does it for you
Apex buckets person-unit experiments on the canonical customer record, preserves anonymous device continuity if a browser was bucketed before login, counts every human exactly once across results and wiring checks, and isolates staging/dev builds from production.
How to set this up in 5 steps
Install the Apex web SDK and mobile SDK
Wire
@apex-inc/sdk(or@apex-inc/nextfor flicker-free SSR) on your web app and install the Apex mobile SDK on iOS or Android.Call identify(userId, traits) on every login across web and mobile
Pass your exact stable database or auth userId whenever a customer signs in so Apex links each device deterministically without probabilistic IP guessing, and sign browser identify() calls with server HMAC userHash.
Create the experiment with randomization_unit set to person
When creating the test in Apex or via create_experiment, switch randomization_unit from visitor (per-device default) to person so signed-in customers receive one consistent arm across desktop and phone.
Forward userId and
apex_vidon server-side conversion eventsWhen purchases or upgrades complete on your backend or Stripe webhook, pass the customer's userId via the Server Events API so mobile checkouts credit the desktop exposure cleanly.
QA on staging with All builds before shipping to production
Verify arm consistency and single-subject deduplication on staging (where identities isolate under <visitorId>::beta) while production metrics stay at zero.
Deterministic person-unit bucketing
Apex solves cross-device testing natively on the same identity layer that powers your customer profiles, with zero probabilistic IP guessing:
| Scenario | Cookie-only A/B tool | Apex (randomization_unit: "person") |
|---|---|---|
| Signed-in user visits on laptop and phone | Counted as 2 people; may see both variants | Counted as 1 person (contact:<id>); sees the same variant on both |
| User reloads the page 4 times | Frequently inflates exposure counts | Counted once (first exposure wins) |
| User sees Variant A on laptop, buys on phone | Conversion orphaned from exposure | Purchase joins Variant A on the single customer record |
| Anonymous visitor never logs in | Counted as 1 browser | Counted as 1 browser (never merged on an IP guess) |
Wiring checklist
- Install the SDKs: Add
@apex-inc/sdk(or@apex-inc/nextfor flicker-free SSR) on web and the Apex mobile SDK on iOS/Android. - Call `identify(userId, traits)` at login on every surface: Pass your stable user ID and pair browser calls with server-generated HMAC
userHash(see Signed sign-ins) so nobody can spoof another customer's ID. - Choose `randomization_unit: "person"`: Use
personfor tests spanning signed-in web and mobile apps (leavingvisitorfor pre-login marketing pages). Note that if a browser was already bucketed while anonymous before login, Apex preserves the arm that device already saw so the screen never flickers mid-session. - Forward `userId` on backend conversions: Send Stripe or backend checkout completions through the Server Events API with
userId(andapex_vidwhen available).

Keeping staging QA out of production results
Testing a cross-device experiment on staging or localhost never inflates production metrics. Apex namespaces staging and dev identities under <visitorId>::beta and <visitorId>::dev, defaults every experiment results view to production traffic only, and lets you flip the filter to All builds during QA to confirm cross-device deduplication before shipping. See the full Cross-device experiments reference.
What this costs on Apex
Live Apex pricing · Pay-as-you-go
Estimated Apex cost for Cross-platform app with 15,000 experiment assignments and 30,000 events/month
$0 / month
Covered by monthly free allowances.
| Apex meter / schedule | Scenario volume | Free allowance / basis | Rate | Apex cost |
|---|---|---|---|---|
Events Web + mobile identify and conversion events (30,000 monthly events across web and app) | 30,000 / mo | 1M / month | $5 per 100K events | $0 |
Orchestrations Person-unit cross-device experiment assignments (Consistent variant assignment across web and mobile SDKs) | 15,000 / mo | 1M / month | $5 per 100K assignments | $0 |
Signed sign-ins (HMAC userHash) and staging/dev environment isolation are included on every workspace. History: 13 months no card, 3 years with card, 7 years once you've paid an invoice. Live pricing.
Third-party and campaign costs (not paid to Apex)
| Expense | Typical range | Notes |
|---|---|---|
| External CDP or identity resolution vendor | $0/mo | Cross-device identity stitching is built into Apex natively |
Every meter includes a monthly free allowance that resets automatically, with zero extra charge for cross-device identity stitching or signed sign-ins.

