Publisher embed

Story Chat — conversation about the article

Add a chat dock below your WordPress article. Readers ask questions about that story — answers use the page content and Tanzania context.

← Publisher program Embed forex rates on WordPress — embed guide Partners & support

Story Chat is a single script tag on your site. It does not change your theme — it only appears on pages with a WordPress-style article (article.post).

The first message sends the URL, slug, and article body to Nukta AI; follow-ups send only the message and conversationId.

WHAT READERS GET

On your article pages

A fixed dock at the bottom — suggested questions, streaming replies, and a “Powered by Nukta AI” credit.

💬

Suggested questions

Three quick chips (e.g. who is affected, summary, comparison) — customizable in config.

Streaming answers

Replies stream in via /api/chat (SSE), same as the main Nukta AI chat.

🇹🇿

Swahili-first

Default UI language is Swahili; set preferredLanguage: "en" for English.

No clutter elsewhere

The script does nothing on non-article pages — no extra widget.

QUICK START

Copy-paste embed

Place these tags before </body> on article pages (or via GTM). Change sourceName to your site name.

Embed code

<script>
  window.NuktaStoryChatConfig = {
    apiUrl: 'https://ai.nukta.co.tz/api/chat',
    nuktaUrl: 'https://ai.nukta.co.tz',
    preferredLanguage: 'en',
    profileType: 'tanzania',
    sourceName: 'Your Site Name',
    suggestions: [
      'Nani anaathirika?',
      'Kwa kifupi vitu gani muhimu nijue?',
      'Linganisha na habari zinazofanana na hii.'
    ]
  };
</script>
<script src="https://ai.nukta.co.tz/assets/embed/story-chat.js" async></script>

CONFIG

NuktaStoryChatConfig options

All optional. You can also use data-* on the <script> tag (e.g. data-source-name="Gazetini").

apiUrl
Chat API URL (default: https://ai.nukta.co.tz/api/chat).
nuktaUrl
Link for the “Powered by Nukta AI” credit.
preferredLanguage
sw or en — UI and reply language.
profileType
Chat engine profile type (default: tanzania).
sourceName
Source name in article metadata (e.g. your newsroom name).
suggestions
Array of suggested question strings.
articleSelector
CSS selector for the article root if not standard WordPress (e.g. article.post).

GTM / WORDPRESS

Google Tag Manager or plugin

Create a Custom HTML tag that fires on article pages only (trigger: page path or post template). Put config above the script tag.

On WordPress: footer.php, an “Insert Headers and Footers” plugin, or a child theme that allows scripts on single posts.

REQUIREMENTS

When the widget appears

The script looks for <article> with class post, post-*, or id post-123. Content must be at least 80 characters of text (after stripping nav, comments, etc.).

  • Article should have .entry-title (or h1) and .entry-content (or [itemprop="articleBody"]).
  • HTTPS recommended; the script loads marked.js from a CDN for markdown rendering.
  • For access limits or usage questions, reach out via the Partners page.

DEMO

Try it below

The sample article below uses WordPress markup — the Story Chat widget should appear at the bottom of this page.

Sample article: how Story Chat works on your site

This is a demonstration post with WordPress-style markup. On your live site, Story Chat reads the real headline and body from the article your readers are viewing.

Try the dock below: ask who is affected, request a short summary, or compare this story with related news. Answers are grounded in this page and Tanzania context.

Publishers add one script tag — no theme changes required. The widget only loads on article pages that match the standard WordPress article pattern.