Skip to main content
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.

How it works

Each unique page context gets its own pool of starter questions, shared by every visitor who loads that context. Remark generates the pool from the attributes on the <remark-qa-activator> element and from your catalog:
  • page-title, or page-key when there’s no title
  • context-key
  • page-content
  • the catalog name and description of each product in product-ids
Remark also follows any Question generation instructions you’ve written for the page on the Questions page. When any of these inputs change, Remark replaces the pool’s unlocked questions for everyone. Locked questions keep their positions, and a set you’ve frozen with Freeze set doesn’t regenerate. Visitors see the previous questions until the new ones are ready. On the first visit to a new page context, the embedded chat waits while Remark generates its pool. The attributes describe the page, not the visitor. Text that changes from one visitor to the next either belongs in context-key, when it takes one of a small set of values, or should be left out. 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

string
A product ID from your ecommerce platform. When a product is set or detected, questions target that product, and Remark ignores page-key, page-title, page-content, product-ids, and context-key. If the product isn’t in your Remark catalog, the element shows site-wide questions.On Shopify storefronts, Remark detects the product automatically. On other platforms, a ProductPageView track event sets the same product. Set external-id only when the embedded chat should target a different product.Example: 7982345678901
string
Identifies the page and its question pool. Without page-key, Remark ignores page-title, page-content, product-ids, and context-key and shows site-wide questions.Elements with the same page-key share one stored title, content, and product list. Give them the same page-title, page-content, and product-ids, or give each its own page-key.Example: /collections/running-shoes
string
The page’s title. Used when generating questions — helps Remark understand what the page is about.Example: Women's Running Shoes
string
The page’s main text content. More content = more relevant questions.Example: Shop our selection of lightweight trail and road running shoes...
string
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,7982345678902
string
Splits a page into separate question pools. Use it for multiple embedded chats that share the page’s content, or for a page whose meaning depends on a small set of states — a quiz result, a selected tab, a step in a flow. Each distinct key gets its own pool, even at the same URL, and the key text is part of the context Remark generates that pool from. Keep the set of keys small and fixed: every new key is a new pool to generate. On product pages, Remark ignores context-key, so every element there shares the product’s pool.Example: featured-collection

Examples

Product page

A furniture store’s product detail page:
Product context is the most specific scope. Remark generates questions about this exact product — dimensions, materials, care instructions. No need for page-key, page-title, or page-content since the product catalog provides all the context Remark needs.
On Shopify storefronts, Remark detects the product automatically, and on other platforms a ProductPageView track event sets it. Either way, you only need external-id when the embedded chat should target a different product.

Collection page

An outdoor gear store’s “Hiking Boots” collection:
Questions are generated about the collection as a whole — visitors might see “What’s the difference between dayhiking and backpacking boots?” or “Which boots are waterproof?” The product IDs give Remark awareness of what’s in the collection without scoping questions to a single product.

Blog post

A skincare brand’s ingredient guide:
No product IDs needed unless the article recommends specific products. Questions are generated from the article content — visitors might see “How often should I use retinol?” or “Can I use retinol with vitamin C?”

Landing page with multiple sections

A home goods store with separate “Kitchen” and “Bathroom” sections on the same page:
Each section has its own page-key, so each keeps its own content, products, and question pool. The kitchen section gets questions about cookware, and the bathroom section gets questions about towels and organizers. Elements that share a page-key also share one stored title, content, and product list, so context-key alone can’t give two sections different content.

Quiz results page

A running store’s shoe finder ends on a results page. The recommendation differs per visitor but always comes from the same three categories:
page-content is the same for every visitor, and context-key carries the part that varies. Each of the three results gets its own pool, generated once and shared by every visitor with that result — a stability runner sees questions about stability shoes, a trail runner sees questions about trail shoes. Putting the recommendation into page-content instead looks similar but behaves very differently. Each visitor with a new result rewrites the page’s context and regenerates its single pool, so most visitors see questions written for someone else’s result.

Per-placement copy

Two more attributes let a specific embedded chat carry its own copy — useful when one placement, like a collection page, should read differently from the rest of your site without changing the text every other placement uses.
string (JSON)
A JSON object mapping label paths to replacement text, using the same paths as the label editor in the dashboard (Settings > Features > Labels). Overrides apply only to this element; every other Remark surface keeps your site-wide labels. Keys that don’t match an existing label are ignored.Example: {"widgetScenes.landingHeading": "Got a question? We can help you."}
string
Replaces the featured expert’s tagline on this element’s landing screen. The expert’s own tagline still appears on every other placement.Example: Ask about hiking boots — or anything else.
Not sure which label path controls a piece of copy? The label editor in the dashboard lists every customizable label, or contact support@remark.ai.

Per-placement behavior

These attributes change how a single embedded chat shows its starter questions.
number
How many starter questions this element shows, as a positive integer. Defaults to 3.Example: 6
boolean
Keeps the questions the element loaded with. Without it, Remark replaces a question with a new one after a shopper uses it. With it, used questions stay in place.Example: <remark-qa-activator static-questions></remark-qa-activator>
string
Overrides the dashboard’s Interaction mode setting for this element. inline keeps the conversation in the embedded chat, and handoff opens the floating chat widget. Has no effect when Inline activator only is turned on.Example: handoff

Tips

  • Use a stable path for page-key, such as /collections/hiking-boots. Remark reduces a full URL to its path, drops the query string and fragment, collapses repeated slashes, removes a trailing slash, and strips a leading two-letter segment such as /en/ or /fr-ca/. Remark keeps the casing, so /Collections/Boots and /collections/boots are different pages.
  • More page-content = better questions — the more text you provide, the more relevant the generated questions will be.
  • external-id takes priority — when present, questions are about that product regardless of other attributes.
  • Regeneration is rate-limited per pool. A pool can regenerate 10 times in quick succession, then about once an hour. Until then, visitors keep seeing the existing questions.
  • Removing an attribute doesn’t clear it. Remark keeps the last title, content, and product list it received for a page-key.

Best practices

  • Keep product-ids stable. Remark regenerates questions whenever the context changes, and product-ids are part of that context. If the product list changes on every page load, for example because it reflects personalized recommendations or a rotating subset, 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. Order doesn’t matter, and Remark ignores IDs that aren’t in your Remark catalog.
  • Send the same page-content to every visitor. The same principle applies — timestamps, personalized greetings, live inventory counts, and per-visitor recommendations all change the context and trigger regeneration. A context that regenerates too often stops keeping up, and visitors see questions generated for an earlier version of the page. Strip volatile text before passing it. When the variation is a small set of states, move it to context-key; when it isn’t, leave it out.