Skip to main content
This guide fetches an approved ad and tracks it. It assumes a publisher has already set up tiers and approved at least one ad. If you are the publisher setting things up, start with the Publisher quickstart.
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

Building with React? Install @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