For developers For marketers Publishers Join the waitlist
Technical integration

One script tag. Zero backend changes. Full attribution.

Treadwell integrates with any paywall stack in under an hour. No API keys on your end, no infrastructure changes — here's exactly what happens under the hood.

STEP 01

Drop one script tag onto your paywall page

Treadwell's embed script takes three data attributes — your publisher ID, preview depth, and affiliate ID. That's the full configuration surface. No backend route, no webhook, no SDK to install.

The script renders a "Chat with a free AI preview" CTA directly below your existing subscribe button. Placement, label copy, and button styling are all configurable via attributes or overrideable with CSS.

paywall.html
<!-- Add below your existing subscribe button --> <script src="https://cdn.treadwell.ai/embed.js" data-publisher-id="pub_abc123" data-preview-depth="0.15" data-affiliate-id="aff_xyz789"> </script> <!-- Optional overrides --> <!-- data-button-label="Preview with AI" --> <!-- data-button-position="before-paywall" --> <!-- data-article-selector=".article-body" -->
STEP 02

Reader completes a standard OAuth handshake

Clicking the CTA initiates an OAuth 2.0 authorization flow against the reader's chosen AI platform — Claude, ChatGPT, Gemini, or Perplexity. Treadwell requests a read-scoped token scoped to the preview session only.

Your infrastructure never touches the token. The reader's credentials are exchanged directly between their browser and the AI provider. Treadwell receives only the session context needed to route the preview request.

OAuth platform routing
ClaudeAnthropic OAuth 2.0 · read scope
Supported
ChatGPTOpenAI OAuth 2.0 · read scope
Supported
GeminiGoogle OAuth 2.0 · read scope
Supported
PerplexityPerplexity OAuth 2.0 · read scope
Supported
STEP 03

Content is extracted and truncated server-side

Treadwell's extraction layer fetches the article from your server (or CDN), applies the configured data-preview-depth truncation, and passes only the approved slice to the AI's context window. The default is 15%.

Extraction and truncation happen on Treadwell's infrastructure — the full article text is never transmitted to the reader's device or stored by the AI provider. Your origin is called once per session with standard HTTP, no special headers required.

Content extraction pipeline
📄
Full article fetched2,400 words from your origin
Your server
data-preview-depth="0.15"
✂️
Truncated slice passed to LLM360 words · enforced server-side
Approved
🔒
Remainder discarded2,040 words · never transmitted
Protected
STEP 04

HMAC-signed affiliate link closes the attribution loop

Every AI response is appended with a signed affiliate link using HMAC-SHA256. The signature binds the link to the session, publisher, and article — preventing spoofing and ensuring accurate attribution.

Click events are ingested via Treadwell's event pipeline and joined against verified subscription events from your platform. CPA is credited only on confirmed conversions. Publisher dashboards reflect attribution in real time — by article, by AI platform, and by date.

Attribution pipeline
🔗
Affiliate link clickedHMAC signature verified · session matched
Valid
📡
Conversion event receivedSubscription confirmed by your platform
Matched
💰
CPA credited to publisherQueued for next payout cycle
Earned
Technical FAQ
Common integration questions
Which CMS and paywall platforms are compatible? +
The embed is framework-agnostic vanilla JavaScript with no external dependencies. It works alongside Piano, Zuora, Substack, Ghost, WordPress (any paywall plugin), and fully custom implementations. The only requirement is the ability to inject a script tag on the paywall page. Treadwell auto-detects article body content using semantic HTML heuristics, with an optional data-article-selector override for non-standard markup.
Can AI platforms use publisher content for model training? +
No. Treadwell's API agreements with all supported AI platforms include an explicit prohibition on training use of content passed through the preview pipeline. The content slice is used solely to generate the reader's in-session response. It is not retained, logged for training, or accessible to the model provider outside the active session context.
What happens if the Treadwell embed fails to load or the API is unavailable? +
The embed is designed to fail silently. If the script fails to load, times out, or receives a non-200 from the Treadwell API, no UI is rendered and the reader sees only your existing paywall. There is no error state visible to the reader, and your primary subscribe CTA is unaffected. The embed adds zero render-blocking to your page load path.
How is the affiliate link signed and what prevents replay attacks? +
Each affiliate link is signed with HMAC-SHA256 using a per-publisher secret, bound to a session ID, article hash, and a 24-hour expiry timestamp. Links are single-use — a click registers the attribution and invalidates the token. Replayed or tampered links are rejected at the attribution endpoint before any CPA is credited.
Is there a sandbox environment for testing the integration? +
Yes. All publisher accounts receive a sandbox portal ID and affiliate ID that route to Treadwell's staging environment. Sandbox sessions generate real OAuth flows and AI responses but do not credit CPA or transmit events to the production attribution pipeline. You can validate the full integration end-to-end before going live.

Ready to integrate?

Join the waitlist and we'll send you sandbox credentials along with the full integration guide within 48 hours.

Join the waitlist See the marketer overview →