Playwire — Integration Reference

Ad integration examples

Reference implementations demonstrating Playwire ad integrations across different frameworks and platforms. Each project is a fully functional site wired to a live ad configuration.

Stack — Single-page applications

Stack React Vite

React — Stack

React SPA using the Playwire Stack tag. Demonstrates spaNewPage, spaAds, and filter-driven destroyUnits / spaAddAds lifecycle.

/spa/react-stack

Ramp — Single-page applications

Ramp React Vite

React — Ramp Script

React SPA using the Playwire Ramp Script. Route-specific spaNewPage paths, spaAds on articles landing, standard_iab_cntr1 unit lifecycle.

/spa/react-ramp
Ramp Next.js App Router

Next.js — Ramp Script

Next.js 15 App Router SPA using the Playwire Ramp Script. usePathname for route tracking, same Ramp lifecycle as React — spaAds on articles landing and rewarded video, HEM subscribe flow.

/spa/next-ramp
Ramp Svelte SvelteKit Vite

Svelte — Ramp Script

SvelteKit SPA using the Playwire Ramp Script. Same Ramp lifecycle as the React version — for route changes, spaAddAds on modal open, destroyUnits on close.

/spa/svelte-ramp
Ramp Vue 3 Vite

Vue 3 — Ramp Script

Vue 3 SPA using the Playwire Ramp Script. Composition API with <script setup>, watch for route tracking, spaAddAds on modal open, destroyUnits on close.

/spa/vue-ramp

Standalone pages

Ramp Rewarded Video Vanilla JS

Rewarded Video - Conditional Fill

Manually checks for rewarded video fill on load before surfacing the ad. The watch button only appears when fill is confirmed, preventing empty-slot UX.

/pages/rv-conditional-fill