Skip to main content
React bindings for Revinel publisher integrations. Covers both integration jobs:
  1. Render ads on your site: RevinelProvider + hooks, on top of @revinel/sdk.
  2. Acquire advertisers: the <TierSelector> / <TierSelectorDialog> “Subscribe to advertise” widget.

Install

react (>=18) is a peer dependency.

Render ads

Wrap your app once, then read ads with the hooks:
useTracking records a viewable impression (via IntersectionObserver) and wires click tracking through getClickProps(). Use useAds({ count }) for a grid. For a layout-persistent ad that never remounts on client-side navigation, impressions fire only once per ad id. Pass resetKey set to a value that changes per page view (the current pathname) to restore one impression per page view: useTracking(ad?.id, { resetKey: pathname }).

Tier selector (acquire advertisers)

Inline:
Or as a controlled modal:
Build your own pricing UI instead with useTiers() + useCheckout():

Exports

  • Provider: RevinelProvider, useRevinelClient
  • Ads: useAd, useAds, useTracking
  • Tiers/checkout: useTiers, useCheckout
  • Widgets: TierSelector, TierSelectorDialog
Every hook’s option and return types are exported (RevinelAdOptions, RevinelQueryState, …) so you can type wrappers around them.