1. Create the signed slot
In Dashboard → Products, create a recommendation slot and save the exact production route that will render the component.
Replace both placeholders. Copy your real signed token from the dashboard into both data-project-relay-slot and data-slot. Do not publish the literal YOUR_SLOT_TOKEN value.
2. Render the slot and load the script
For Next.js, use next/script with the dashboard-recommended afterInteractive strategy. This loads the widget after hydration without blocking the route.
import Script from "next/script";
export function RelayRecommendation() {
return (
<>
<div data-project-relay-slot="YOUR_SLOT_TOKEN" />
<Script
src="https://relaymyproject.com/widget/v1.js"
data-slot="YOUR_SLOT_TOKEN"
strategy="afterInteractive"
/>
</>
);
}Render <RelayRecommendation /> at the intended location. If a shared layout can render more than once, keep the script in the layout and render only the signed container in each route.
React without Next.js
Render the signed container in your component and load the dashboard-generated script once from your document template or application shell. Avoid injecting a raw script tag during every component render.
3. Deploy the exact route
Deploy the application and open the saved path over public HTTPS. Confirm that redirects settle on the same page recorded in Relay and that authentication, preview protection, or middleware does not block it.
Run “Test live installation”
Relay fetches the production route and confirms the signed slot token is present. Successful verification unlocks matching; it does not publish a recommendation until the required approvals are complete.
Troubleshooting
- View the production DOM and confirm the signed
divexists after deployment. - Make sure the token in the container matches the
data-slotpassed toScript. - Load the widget script once; duplicated application-shell scripts can create confusing behavior.
- If you use a content-security policy, allow
https://relaymyproject.comas a script source. - Verify the route without a developer login, preview cookie, or deployment password.
Ready for your signed component?
Add and verify your product first, then Relay will generate the slot token bound to the production route you choose.
Get founding access →Request guided installation