1
Get your workspace ID
Copy your workspace ID from the dashboard Install page or Settings → General. The serving API
is scoped by this ID, and it is safe to ship in client-side code.
2
Install the SDK
@revinel/react instead for hooks with built-in
tracking.3
Fetch an ad
getAd resolves to an ad or null when nothing is eligible. An empty result is normal, so always
handle it.4
Render it
An ad gives you a
name, a websiteUrl (the click destination), and your custom fields under
meta. Draw it however your design calls for.5
Track impressions and clicks
Record an impression when the ad becomes visible, and a click when someone follows it. Both are
fire-and-forget.
With React
@revinel/react wraps all of the above in hooks. useTracking wires a
viewable-impression observer and click handler for you:
What’s next
- Serving ads for weighted rotation, placement with
weight, and deduping a grid withexcludeIds. - Custom fields and the
@revinel/sdktypedmetasection to render banners, taglines, and more. - Troubleshooting if an ad does not appear.