Skip to main content

For Human

1

Get your staging publisher ID

Sign up and copy your staging publisher_id from the dashboard.
2

Add the SDK script tag

Load the SDK script synchronously.
Edit index.html:
<head>
  <script src="https://sdk.thrad.ai/sdk.js?token=YOUR_PUBLISHER_ID"></script>
</head>
3

Add a contextual ad under the AI response

Contextual ads fire after your AI responds, matched to the conversation content. Call thrad.render() once you have the AI’s response.
<div data-thrad-type="contextual" data-thrad-format="message"></div>

<script>
  async function onAIResponse(userMessage, aiResponse) {
    await thrad.render({ query: userMessage, response: aiResponse })
  }
</script>

For Agent

1

Get your staging publisher ID

Sign up and copy your staging publisher_id from the dashboard.
2

Paste this prompt into your coding agent

Copy into Cursor, GitHub Copilot, Claude Code, or any LLM-powered editor.

Integrates the Thrads SDK with framework-aware instructions

CursorOpen in Cursor

What’s next

Integration cases

All placement patterns — opener only, contextual, SPA routing, multiple slots

Themes & identity

Customize colors, dark mode, and pass user identity for better ad matching