Documentation Index
Fetch the complete documentation index at: https://docs.trygravity.ai/llms.txt
Use this file to discover all available pages before exploring further.
What experiments do
Not every ad format converts the same across every audience. Acard might outperform a minimal variant on your traffic — or vice versa. Rather than asking you to build an A/B harness, Gravity runs experiments on your behalf: we split traffic across multiple ad variants, measure which one performs best, and gradually shift toward the winner.
Experiments are currently managed by the Gravity team — configured and monitored by us against your live traffic. Self-serve authoring isn’t live yet. Email support@trygravity.ai if you want an experiment set up, or you’ll see results show up in your dashboard as we run them.
How it affects your integration
SDK publishers — automatic
The engine assigns a variant per session and returns No other code changes needed.
ad.variant on the response. The <GravityAd /> component picks it up:Direct-API integrations
If you call
/api/v1/ad and render yourself, you’ll still receive ad.variant, ad.experiment_id, and ad.composition_id on each response. You can participate in experiments by handling different variants in your renderer — or stick with your existing single-variant render and the experiment metadata just flows through for reporting.Experiment metadata on the response
When an experiment is active on traffic that matches your requests, these fields appear on eachAd:
| Field | Description |
|---|---|
variant | Human-readable arm label (e.g. "card-minimal"). |
experiment_id | Canonical experiment ID. |
composition_id | Per-render composition ID (unique per impression). |
renderer_key | Which renderer the engine wants (e.g. "card", "spotlight"). |
Tracking
The engine bakesexperiment_id and composition_id into the encrypted payload on both impUrl and clickUrl. No extra instrumentation — impressions attribute to the right arm automatically, and you’ll see per-arm results in your dashboard.
FAQ
Do I need to do anything for experiments to start working?
Do I need to do anything for experiments to start working?
Not today. Gravity configures experiments on your traffic. If you’re on the SDK, you get automatic variant rendering via
ad.variant. If you’re on the direct API, you still get the experiment metadata — how much you act on it is up to you.Can I run my own experiments?
Can I run my own experiments?
Self-serve experiment authoring isn’t live yet. Email us and we’ll spin one up for you.
Where do I see results?
Where do I see results?
Your dashboard Overview page. Per-arm impressions, clicks, CTR, and conversion rate updated in near-real-time. The Gravity team can also share detailed experiment reports.
Will my ad flicker between variants mid-session?
Will my ad flicker between variants mid-session?
No. Assignment is session-stable via your
sessionId. Same session = same arm.