The embedded chat generates starter questions based on the page it appears on. By default, it falls back to site-wide questions. Page context attributes tell Remark what the page is about so it can generate more relevant, specific questions for your visitors.Documentation Index
Fetch the complete documentation index at: https://docs.remark.ai/llms.txt
Use this file to discover all available pages before exploring further.
How it works
Each unique page context gets its own pool of starter questions. Remark generates these questions from the title, content, and products you provide via HTML attributes on the<remark-qa-activator> element. When the context changes — for example, when you update page-content — questions are regenerated automatically.
Page context follows a precedence order: product context (most specific) takes priority over page context, which takes priority over site-wide questions (the fallback). If external-id is set, questions target that specific product regardless of other attributes.
Attributes
A product ID from your ecommerce platform. When present, questions target this specific product — overrides page context.On Shopify storefronts, Remark detects the product automatically, so you don’t need to set this attribute on product pages.Example:
7982345678901Identifies the page. Same key = same question pool — defines which pool questions come from.Example:
/collections/running-shoesThe page’s title. Used when generating questions — helps Remark understand what the page is about.Example:
Women's Running ShoesThe page’s main text content. More content = more relevant questions.Example:
Shop our selection of lightweight trail and road running shoes...Comma-separated product IDs from your ecommerce platform related to the page. Gives Remark additional product context without changing which pool is used.Example:
7982345678901,7982345678902Distinguishes between multiple embedded chats on the same page. Each key gets its own question pool, even at the same URL.Example:
featured-collectionExamples
Product page
A furniture store’s product detail page:page-key, page-title, or page-content since the product catalog provides all the context Remark needs.
Collection page
An outdoor gear store’s “Hiking Boots” collection:Blog post
A skincare brand’s ingredient guide:Landing page with multiple sections
A home goods store with separate “Kitchen” and “Bathroom” sections on the same page:page-key and page-title (same page) but context-key gives each section its own question pool. The kitchen section gets questions about cookware; the bathroom section gets questions about towels and organizers.
Tips
- Use a stable path for
page-key— something like/collections/hiking-boots, not a full URL with query parameters. Remark normalizes the value, but a clean path is easiest to reason about. - Locale prefixes are stripped automatically —
/en/collections/hiking-bootsand/fr-ca/collections/hiking-bootsboth resolve to/collections/hiking-boots, so you don’t need to remove them yourself. - More
page-content= better questions — the more text you provide, the more relevant the generated questions will be. external-idtakes priority — when present, questions are about that product regardless of other attributes.- Questions regenerate automatically — when context changes (for example, when you update
page-content), Remark generates a new set of questions.
Best practices
- Keep
product-idsstable. Remark regenerates questions whenever the context changes, andproduct-idsare part of that context. If the product list changes on every page load — for example, because it reflects a randomized or personalized sort order — questions will regenerate constantly and never have a chance to settle and improve over time. Pass a consistent set of product IDs that represents the page’s core products. - Don’t change
page-contenton every render. The same principle applies — ifpage-contentincludes dynamic elements like timestamps, personalized greetings, or live inventory counts, it will trigger unnecessary regeneration. Strip volatile content before passing it.