Evaluation beta: Explore public campaign and integration guidance. Integration testing requires separate supervised-pilot approval. Paid ad delivery, deposits and payouts are not available yet. Revenue examples are illustrative.

Public information only. Sign-in, registration, campaign drafts, applications and payments are unavailable on this site.

LoreAds supervised publisher integration

Use one private test conversation and one synthetic sponsored placement. Wait for LoreAds to approve your test window. Download the examples from https://loreads.com/publisher-pilot. The server relay sends requests only to https://loreads.com.

  1. Prepare one chatbot. Sign up at publisher registration with an inbox you control, verify the email, then sign in as a publisher. In Set up your publisher workspace, enter the first chatbot name and select Create chatbot. This creates the pilot chatbot and shows its key. Existing publishers can instead use Chatbots → Register chatbot. Leave fallback off and set your exclusions. Save the one-time chatbot key as LOREADS_API_KEY in your server secret store. Keep it out of source control, browser bundles and logs. Use a fresh chatbot. The relay requests fixed synthetic inventory and the test endpoint rejects any tracked lab mapping before financial posting.

  2. Install the two examples. Download pilot-relay.mjs into your server project (Node 22+) and pilot-browser.mjs into your frontend. Download the publisher SDK once before the window and serve that copy from your frontend as a deferred script. The chat UI must work even if the SDK fails to load.

  3. Connect your server. Create one relay for the entire pilot process. Wire these two same-origin endpoints into your existing session authentication, CSRF protection and JSON body limit. In each handler, load the turn by authenticated session and turn ID. Allow only the designated tester and a single, server-selected synthetic turn. Use an approved topic such as travel flights hotels. Never send the conversation text.

    import { createPilotRelay } from "./pilot-relay.mjs";
    const pilot = createPilotRelay({apiKey: process.env.LOREADS_API_KEY});
    // Inside your authenticated POST handlers, after verifying turn ownership:
    // /pilot/reserve
    res.set("Cache-Control","no-store").json(await pilot.reserve(session.id, turn.id, "travel flights hotels"));
    // /pilot/qualified (separate handler)
    res.set("Cache-Control","no-store").json({state: await pilot.qualified(session.id, turn.id)});
    

    Reject unauthorized requests before calling the relay. On exceptions, return HTTP 503 with a generic error. Log the action and HTTP status only. The relay retains the confirmation token on your server. Run one process, with automatic retries and restarts disabled for the window.

  4. Show the answer first. After the answer is visible, call the browser helper on an empty element beneath that answer. Return its cleanup function to your component's unmount or navigation handler.

    import { showPilotPlacement } from "./pilot-browser.mjs";
    // In an after-render effect for the approved answer:
    const cleanup = showPilotPlacement({mount: sponsoredSlot, turnId: savedTurn.id});
    // On unmount:
    // cleanup();
    

    Keep the card at least half visible for one continuous second. The SDK observes visibility locally. Only qualification triggers the relay. A timeout, cancellation or no-fill leaves the answer available.

  5. Check the result. From an operator-only action in the same server process, call await pilot.report() before the conversation and again after confirmation finishes. Allow 31 seconds after the baseline before requesting the placement. For a fresh chatbot expect selected, mounted, viewable and confirmed to increase by one, financially_posted by zero. The report belongs to that chatbot key. LoreAds checks the financial records separately.

  6. Stop or recover. One publisher, one request in flight, two calls per minute total across all tools. The relay spaces starts by 31 seconds. Avoid parallel dashboard tests or polling. For 401/403, check the key, chatbot status and tracked lab mapping. For 429, 503, timeout, expiry or a lost acknowledgment, stop and review the scoped report when the relay is idle. Never create a replacement placement to resolve an unknown result. A process restart loses the local ticket. Pause the chatbot after the run. To revoke a leaked key, generate a replacement in Chatbots and replace the server secret before any later approved run.

Pilot checklist

  • [ ] Public access. Before issuing a key, open this guide from outside the owner workspace. From the intended relay server, verify the publisher SDK is returned as JavaScript. Stop on a preview sign-in redirect, startup page or HTTP 503. Never copy owner cookies or grant editor access to make a relay work.
  • [ ] Setup. Record the approved publisher, chatbot ID, operator and test window. Restrict both publisher routes to the tester and one owned turn. Install the key server-side. Reserve the entire traffic allowance for this relay.
  • [ ] Baseline. Save the chatbot's scoped shadow counts. In the operator console, record advertiser balances, campaign budgets and spend, publisher balances and earnings, and synthetic receipt count and digest. Keep keys and tokens out of the evidence.
  • [ ] One turn. Wait at least 31 seconds after the baseline request. Show the synthetic answer first, then display the sponsored card. Keep it visible for one second. Send no manual retry.
  • [ ] Reconcile. After qualification finishes, read the scoped report. Expect one new selected, mounted, viewable and confirmed placement, zero new financial postings, and identical financial snapshots. No-fill or expiry means the confirmation gate is still open.
  • [ ] Cleanup. Pause the pilot chatbot, remove the pilot routes or disable their feature flag, remove the server secret and record the final outcome.
  • [ ] Rollback. On an unexpected financial change, authorization failure or ambiguous outcome, stop traffic immediately. Disable the adapter, pause the chatbot, and preserve the timestamps, request IDs when available, and both snapshots. Rotate a suspected exposed key. Reconcile before any new attempt.
Skip to content