Magento (PHP theme)
Full Kelp discovery on Magento Open Source / Adobe Commerce - header search, results, category browse, facets, analytics, and cutover. Luma-style PHP theme.
This guide is storefront discovery on Magento Open Source / Adobe Commerce. The primary stack is a classic Luma-style PHP theme: layout XML, .phtml, and RequireJS (or a type="module" island). You call Kelp from theme JavaScript with the HTTP API and/or @kelpclick/client.
Magento keeps the product detail page (PDP), cart, checkout, and customer account.
Kelp owns discovery: header search, the search results page, category and listing grids you cut over, facets, listing sort and pager, and search analytics.
Not on this page: catalog ingest, admin modules, or a published Magento Composer package. Getting products into a Kelp collection is a separate catalog-sync job. This page assumes the collection already has documents.
Kelp has no required Magento module name and no official Composer package. Theme JS talking to Kelp is enough. If you add a thin custom module, it is yours - typically store-scoped config and, optionally, a controller that forwards JSON and attaches X-Api-Key.
Hyva: the same Kelp request and analytics contract. Keep Kelp in one Alpine island that posts JSON. You do not need a Magento UI component. The Luma examples below are the source of truth; swap the mount markup for Alpine.
What you build
| Surface | Owner after cut-over |
|---|---|
| Header search box | Kelp (intercept Magento catalogsearch) |
| Search results page | Kelp hits grid, sort, pager, facets |
| Category / listing grids you cut over | Kelp browse |
| Layered navigation on those handles | Kelp facets (remove Magento layered nav) |
| PDP, cart, checkout, account | Magento |
| Search-to-conversion analytics | Kelp events + queryId |
- Store-scoped config printed as
window.kelpConfig. - Theme JS that searches or browses, then renders hits, facets, sort, and pagination.
queryIdpersisted across Magento page loads for click, add-to-cart, and (via session) purchase.- Optional: a same-origin PHP proxy so the browser never sees the API key.
Prerequisites and config
You need:
| Value | Where it comes from | Notes |
|---|---|---|
apiKey | Get your keys | Search- and events-scoped only in the browser. A search key cannot post events; use a key scoped to both, or two keys behind a proxy. |
searchUrl | Tenant dashboard | https://{TENANT_ID}-search.kelp.click - not inferred from anything else. |
analyticsUrl | Tenant dashboard | https://{TENANT_ID}-events.kelp.click - never inferred from searchUrl. |
tenantCode | Tenant slug | Optional on the client; stamped on analytics batch envelopes when set. |
collection | Your index name | Usually products. Must already contain documents. |
Website- and store-scoped Magento config is the right place for these values. Multi-store setups can point each store view at its own hosts, key, tenant, or collection. Do not hard-code a second tenant in theme JS.
Only a search- or events-scoped key may appear in theme HTML. Never print an admin or ingest key into .phtml. See Security.
Store-scoped config
Define config paths you own (example group kelp/storefront). Mark fields showInWebsite and showInStore so each website / store view can override.
<!-- Sketch: your module's etc/adminhtml/system.xml -->
<section id="kelp" translate="label" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1">
<group id="storefront" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<field id="search_url" type="text" showInDefault="1" showInWebsite="1" showInStore="1"/>
<field id="analytics_url" type="text" showInDefault="1" showInWebsite="1" showInStore="1"/>
<field id="api_key" type="obscure" showInDefault="1" showInWebsite="1" showInStore="1"/>
<field id="tenant_code" type="text" showInDefault="1" showInWebsite="1" showInStore="1"/>
<field id="collection" type="text" showInDefault="1" showInWebsite="1" showInStore="1"/>
</group>
</section>Read them with ScopeConfigInterface at store scope in a ViewModel (preferred) or block. Then print one window.kelpConfig object from a default-layout .phtml so header search, results, category listings, PDP, and checkout success share the same values.
<?php
/** @var \Magento\Framework\View\Element\Template $block */
$cfg = $block->getData('kelp_config'); // array from your ViewModel
?>
<script>
window.kelpConfig = {
apiKey: <?= json_encode($cfg['apiKey'] ?? '') ?>,
searchUrl: <?= json_encode($cfg['searchUrl'] ?? '') ?>,
analyticsUrl: <?= json_encode($cfg['analyticsUrl'] ?? '') ?>,
tenantCode: <?= json_encode($cfg['tenantCode'] ?? '') ?>,
collection: <?= json_encode($cfg['collection'] ?? 'products') ?>
};
</script>If you use a same-origin proxy, omit apiKey from the page (or leave it empty) and point theme JS at your Magento frontName instead of the Kelp hosts.
SDK vs raw fetch
Prefer @kelpclick/client. It builds search and browse URLs, sends X-Api-Key, wraps analytics batches, and fills sessionId / userId / occurredAt when you use createIdentity + createAnalytics. Load it from the CDN ESM URL on a theme with no bundler.
Raw fetch is supported and matches the Search & browse and Events contracts. Use it only if you cannot load the SDK. Direct callers must supply sessionId, userId, and occurredAt on every event.
<script type="module">
import { createKelpClient, createIdentity, createAnalytics } from 'https://cdn.jsdelivr.net/npm/@kelpclick/client@latest/+esm';
const { apiKey, searchUrl, analyticsUrl, tenantCode, collection } = window.kelpConfig;
const kelp = createKelpClient({
searchUrl,
analyticsUrl,
apiKey,
tenantCode, // optional; included on analytics batch envelopes
});
const identity = createIdentity();
const analytics = createAnalytics({ client: kelp, identity });
const res = await kelp.search(collection, {
q: 'shirt',
page: 1,
perPage: 24,
facets: ['brand'],
});
analytics.trackSearch({
collection,
q: 'shirt',
found: res.found,
page: res.page,
queryId: res.queryId,
});
</script>createKelpClient requires searchUrl, analyticsUrl, and apiKey. Pass searchUrl: '' and/or analyticsUrl: '' when a Magento proxy serves those paths. See Client configuration.
On Luma, a type="module" script in the .phtml is enough (no RequireJS shim). If the theme already loads storefront JS through x-magento-init, pass window.kelpConfig into a small AMD module that calls the same search / browse helpers. You do not need a Kelp RequireJS package.
define([], function () {
return function (config, element) {
// config is window.kelpConfig (or a subset) from x-magento-init
// Prefer createKelpClient from the CDN ESM island; otherwise fetch as above.
};
});Search: header and query
Magento Luma posts the header form (#search_mini_form) to catalogsearch/result. On cut-over, that form must not run Magento catalog search.
Typical approach:
- Keep the Magento mini-search markup (or replace the input).
- Intercept
submit, readq, and route to your Kelp results page (often the samecatalogsearch/resultURL with?q=). - On
catalogsearch_result_index, remove Magento's result list and layered nav (see Cut-over) and mount the Kelp results root.
const form = document.getElementById('search_mini_form');
if (form) {
form.addEventListener('submit', (e) => {
e.preventDefault();
e.stopPropagation();
const q = String(new FormData(form).get('q') || '').trim();
if (!q) {
// Empty query: no-op (stay put) or send the shopper to a browse listing.
// Do not call search() with an empty q.
return;
}
const url = new URL(form.action, window.location.origin);
url.searchParams.set('q', q);
window.location.assign(url.toString());
});
}If you leave Magento's default submit in place, Magento still queries its own catalog search index. Disable or override that path on every store view you cut over.
Search request
Use search when the shopper typed a non-empty q. Body fields (all documented on Search & browse):
| Field | Required | Notes |
|---|---|---|
q | yes | Non-empty string. |
page | no | 1-based. Default 1. |
perPage | no | Default 20. |
facets | no | Fields to return facetCounts for. |
filters | no | KelpFilter[] - { field, op?, values }. |
sort | no | [{ field, direction: "asc" | "desc" }]. |
semanticWeight | no | Search only. Named blend: strict | heavy | default | balanced | light | keyword | off. Omit for keyword-only. Do not send on browse. |
async function runSearch({ q, page = 1, perPage = 24, filters = [], sort, semanticWeight } = {}) {
const params = {
q,
page,
perPage,
facets: ['brand'],
filters,
};
if (sort) params.sort = sort;
if (semanticWeight) params.semanticWeight = semanticWeight;
return kelp.search(window.kelpConfig.collection, params);
}semanticWeight only takes effect when the collection has enableSemanticSearch and you send a weight. Omit is not the same as default. Full contract: Semantic search.
Empty query
search requires a non-empty q. An empty header submit should be a no-op or should browse (category-style listing with no query). Do not POST search with q: "".
The React useSearch hook turns "" into "*" so a pane stays populated. Theme JS calling search directly must not rely on that. See Search vs browse.
Search results page
Mount an empty root on catalogsearch_result_index (or a custom route you already use). Theme JS reads q from the URL, calls search, and renders one listing.
<!-- Magento_CatalogSearch/layout/catalogsearch_result_index.xml in your theme -->
<referenceBlock name="search.result" remove="true"/>
<referenceBlock name="catalogsearch.leftnav" remove="true"/>
<referenceContainer name="content">
<block name="kelp.search"
template="YourVendor_YourTheme::kelp/listing.phtml"/>
</referenceContainer><div id="kelp-listing"
data-mode="search"
data-q="<?= $block->escapeHtmlAttr($block->getRequest()->getParam('q')) ?>">
<div data-kelp-sort></div>
<div data-kelp-facets></div>
<p data-kelp-status></p>
<div data-kelp-hits></div>
<nav data-kelp-pager></nav>
</div>Hits, empty state, pager, sort
The response shape is the same for search and browse (KelpSearchResponse):
| Field | Use it for |
|---|---|
hits | Product cards. Each hit is { document, highlights }. |
found | Total matches. totalPages = Math.ceil(found / perPage). |
page | Current 1-based page (echo of the request). |
facetCounts | Facet UI. |
queryId | Persist, then send on later events. |
function renderListing(root, data, { page, perPage, sortField } = {}) {
const hits = data.hits || [];
const found = data.found ?? 0;
const totalPages = Math.max(1, Math.ceil(found / perPage));
root.dataset.queryId = data.queryId || '';
if (data.queryId) sessionStorage.setItem('kelp_query_id', data.queryId);
const status = root.querySelector('[data-kelp-status]');
const hitsEl = root.querySelector('[data-kelp-hits]');
const pagerEl = root.querySelector('[data-kelp-pager]');
if (!hits.length) {
status.textContent = 'No results';
hitsEl.innerHTML = '<p data-kelp-empty>No products matched. Try another term or clear filters.</p>';
pagerEl.innerHTML = '';
return;
}
status.textContent = `${found} results`;
hitsEl.innerHTML = hits.map((hit) => productCard(hit.document || {})).join('');
pagerEl.innerHTML = pagerHtml(data.page || page, totalPages);
}
function pagerHtml(page, totalPages) {
const prev = page > 1 ? `<button type="button" data-kelp-page="${page - 1}">Previous</button>` : '';
const next = page < totalPages ? `<button type="button" data-kelp-page="${page + 1}">Next</button>` : '';
return `${prev}<span>Page ${page} of ${totalPages}</span>${next}`;
}Sort UI sends sort on the next request. Sortable fields are whatever your collection config already references. Sorting an unconfigured field returns 400. See Pagination and sorting.
<select data-kelp-sort>
<option value="">Relevance</option>
<option value="minPrice:asc">Price: low to high</option>
<option value="minPrice:desc">Price: high to low</option>
<option value="title:asc">Name</option>
</select>function parseSort(value) {
if (!value) return undefined;
const [field, direction] = value.split(':');
return [{ field, direction }];
}minPrice and title appear in the API examples. On a Magento-fed collection, only send fields you actually indexed and marked sortable.
Product cards and PDP links
Kelp does not impose a document schema. Each hit is { document, highlights }. id and objectId are always present. Other keys are the fields you indexed. Map the card from hits[].document:
function productHref(doc) {
// Implementer choice: url_key (URL rewrite), sku (your sku route), or id.
if (doc.url_key) return `/${doc.url_key}`;
return `/catalog/product/view/id/${encodeURIComponent(doc.id)}`;
}
function productCard(doc) {
const objectId = doc.objectId || doc.id;
const title = doc.title || objectId;
const img = doc.featuredImage || '';
const price = doc.minPrice;
const href = productHref(doc);
return `
<a href="${href}" data-object-id="${objectId}">
${img ? `<img src="${img}" alt="" />` : ''}
<span>${title}</span>
${price != null ? `<span>${price}</span>` : ''}
</a>`;
}Prefer a Magento URL rewrite from url_key when you indexed it. sku and id are fallbacks. objectId (or id) is what you send on analytics product events - that is the document id in the collection, not necessarily the Magento entity id unless you indexed it that way.
Optional fields on the request trims the payload to the keys the card needs (id, objectId, title, and whatever you render).
Browse: category and listing pages
Use browse when there is no shopper query: category pages, "all products", and an empty search box you choose to treat as a listing. Use search only when q is a non-empty string.
| Search | Browse | |
|---|---|---|
| When | Header / results with a typed query | Category and listing grids, no query |
q | Required, non-empty | Not accepted |
semanticWeight | Optional | Do not send |
| Filters, facets, sort, page | Yes | Yes |
Full comparison: Search vs browse.
Browse the same way you search, without q:
async function runBrowse({ page = 1, perPage = 24, filters = [], sort } = {}) {
return kelp.browse(window.kelpConfig.collection, {
page,
perPage,
facets: ['brand'],
filters,
sort,
});
}Point both modes at one listing renderer (renderListing above). Swap only the transport (search vs browse) and the default filters (for example, scope a category page to the category field you indexed).
const root = document.getElementById('kelp-listing');
const q = String(root.dataset.q || '').trim();
const data = q
? await runSearch({ q, filters: activeFilters, page, sort })
: await runBrowse({ filters: activeFilters, page, sort });
renderListing(root, data, { page, perPage, sortField });On cut-over category handles (catalog_category_view and any custom listing handles), remove Magento layered navigation and the Magento product list so only the Kelp grid, facets, sort, and pager render. Leaving both stacks on the page doubles requests and shows two conflicting result sets.
<!-- Magento_Catalog/layout/catalog_category_view.xml in your theme -->
<referenceBlock name="catalog.leftnav" remove="true"/>
<referenceBlock name="category.products" remove="true"/>
<referenceContainer name="content">
<block name="kelp.browse"
template="YourVendor_YourTheme::kelp/listing.phtml"/>
</referenceContainer>Confirm the block names in your theme (Luma, a Luma child, or a custom theme). Hyva uses different layout names; remove that theme's toolbar, product list, and filter sidebar the same way.
Scope a category listing with a filter on the field you actually indexed for category membership (id, path, or url key). Do not invent a Kelp field name - use the facet attribute you configured on the collection:
filters: [{ field: categoryField, op: '=', values: [categoryValue] }]Emit collection_viewed when that page loads (see Analytics).
Filters and facets
Request facet fields on every search or browse call. Render facetCounts. When the shopper toggles a value, add a filter clause and query again.
Only fields configured as facet attributes on the collection can be requested or filtered. An unconfigured field returns 400. See Filtering & facets.
const res = await kelp.search(collection, {
q: 'shirt',
facets: ['brand'],
filters: [],
page: 1,
perPage: 24,
});
// res.facetCounts:
// [{ field: 'brand', counts: [{ value: 'globex', count: 12 }] }]Checkbox facet
Multiple values in one = clause are OR (IN). Separate clauses are AND. op defaults to =.
function renderFacet(facet, selected) {
const current = selected[facet.field] || [];
return `
<fieldset data-facet-field="${facet.field}">
<legend>${facet.field}</legend>
${(facet.counts || [])
.map(({ value, count }) => {
const checked = current.includes(value) ? 'checked' : '';
return `<label>
<input type="checkbox" value="${value}" ${checked} />
${value} (${count})
</label>`;
})
.join('')}
</fieldset>`;
}
function filtersFromSelected(selected) {
return Object.entries(selected)
.filter(([, values]) => values.length)
.map(([field, values]) => ({ field, op: '=', values }));
}
// Shopper checks brand=globex, then re-query:
const filters = [{ field: 'brand', op: '=', values: ['globex'] }];brand is the field used in the API examples. Replace the facets list with the facet attributes configured on your collection.
Price range (optional)
Price sliders use range when both bounds are set, or >= / <= when only one bound is set. Values are always strings. Full pattern: Price & range filtering.
function toPriceFilters(field, min, max) {
const validMin = Number.isFinite(min) ? min : undefined;
const validMax = Number.isFinite(max) ? max : undefined;
if (validMin !== undefined && validMax !== undefined && validMin > validMax) return [];
if (validMin !== undefined && validMax !== undefined) {
return [{ field, op: 'range', values: [String(validMin), String(validMax)] }];
}
const out = [];
if (validMin !== undefined) out.push({ field, op: '>=', values: [String(validMin)] });
if (validMax !== undefined) out.push({ field, op: '<=', values: [String(validMax)] });
return out;
}
// Example: indexed price field minPrice (use the field you configured)
const filters = [
...filtersFromSelected(selected),
...toPriceFilters('minPrice', 1000, 5000),
];Compose facet, price, and category-scope clauses in one filters array. See Combining filters.
After each refinement, call the same runSearch or runBrowse helper with the new filters, reset page to 1, and re-render hits, facets, and the pager.
Analytics
Every search or browse response may include queryId. Persist it (sessionStorage is the Magento-friendly choice: header, results, category, PDP, cart, and success are different full-page loads). Each new search or listing overwrites the stored value so attribution points at the most recent discovery query.
if (data.queryId) sessionStorage.setItem('kelp_query_id', data.queryId);
const queryId = sessionStorage.getItem('kelp_query_id') || undefined;Emit these kinds from the storefront. Taxonomy and fields: Events. Attribution rules: Attribution. HTTP batch envelope: Events API.
| When | kind | Magento hook | queryId |
|---|---|---|---|
| Search or browse returns | search | After the listing response | Yes (res.queryId) |
| Category / listing page viewed | collection_viewed | catalog_category_view (and other cut-over listings) | Yes if you have one |
| Shopper clicks a hit | product_clicked | Click on [data-object-id] | Yes |
| PDP viewed | product_viewed | Product view layout | Usually omit |
| Add to cart succeeds | product_added_to_cart | Luma ajax:addToCart / Hyva cart event | Yes, from sessionStorage |
| Order placed | purchase | checkout_onepage_success (or your success layout) | Usually omit |
objectId on product events is the document id in the Kelp collection (document.objectId or document.id). On collection_viewed, objectId is the listing identity you choose (category id or url key), not a product id.
const collection = window.kelpConfig.collection;
const queryId = sessionStorage.getItem('kelp_query_id') || undefined;
// After search or browse
analytics.trackSearch({
collection,
q: q || undefined,
found: res.found,
page: res.page,
queryId: res.queryId,
filters,
});
// Category listing
analytics.trackCollectionViewed({
collection,
objectId: categoryKey, // your category id or url key
queryId: res.queryId,
});
// Result click
analytics.trackProductClicked({
collection,
objectId,
queryId,
});
// PDP
analytics.trackProductViewed({ collection, objectId });
// Add to cart - read queryId from sessionStorage (survives the PDP navigation)
analytics.trackProductAddedToCart({ collection, objectId, queryId });
// Success page - omit queryId on multi-item carts
analytics.trackPurchase({
collection,
orderId: String(orderId),
value: orderGrandTotal,
currency: orderCurrency, // ISO 4217, e.g. 'USD'
items: orderItems.map((item) => ({
objectId: String(item.productId), // Kelp document id; map from what you indexed
quantity: item.qty,
price: item.price,
})),
});createAnalytics fills occurredAt, sessionId, and userId. After Magento login, call identity.identify({ userId: String(customerId) }) so later events carry the customer id instead of anon_<id>. Call identity.reset() on logout. See Identity.
Magento notes: sessionStorage, add-to-cart, purchase
Magento discovery, PDP, cart, and success are separate pages. sessionStorage is same-origin for the whole store view, so kelp_query_id survives PDP and add-to-cart. Use it on product_clicked and product_added_to_cart.
Luma add-to-cart is usually AJAX. Hook the success path (for example the ajax:addToCart event on body, or your theme's equivalent) and emit product_added_to_cart there - not on button mousedown, so failed adds are not tracked.
Checkout success is a Magento page (checkout_onepage_success). Theme JS can run there. Emit purchase from a small success-page island that reads the order id, grand total, currency, and line items Magento already prints (or a ViewModel you add). Do not attach a single queryId to the order: carts mix search, browse, and merchandising. Purchase attribution uses stable sessionId and userId. Pass queryId on purchase only if you can guarantee every line came from one query.
If you identify the Magento customer on login, keep that userId through checkout so the success-page purchase event stitches to earlier search and click events.
Optional: thin PHP proxy (same-origin)
A small module you own can hide the key: the browser posts to Magento; Magento forwards to Kelp. This is optional. Direct browser calls with a search- and events-scoped key are supported.
Sketch only - use your own frontName, ACL, and env config:
- Browser
POST /yourfront/kelp/searchwith the JSON search or browse body (no key). - Controller reads
KELP_SEARCH_URLandKELP_API_KEYfrom env /app/etc/env.php(or a config path you define). - Server
curlsPOST {KELP_SEARCH_URL}/api/v1/collections/{collection}/searchor/browsewithX-Api-Keyand the same JSON body. - Return the upstream JSON and status to the browser.
Do the same for POST .../analytics/events if you want events same-origin. Rate-limit and allow only POST. Do not proxy admin or ingest paths.
With the SDK, set searchUrl: '' and/or analyticsUrl: '' so requests stay on your origin (/api/v1/collections/... and /analytics/events), or point searchUrl at your Magento base URL if you chose a different frontName and map it in the proxy.
This is the Magento equivalent of the same-origin proxy pattern. There is no official Kelp Composer package for this.
Cut-over checklist, verification, and rollback
Cut over per store view. Leave Magento PDP, cart, checkout, and account unchanged.
Checklist
- Catalog documents already exist in the Kelp collection (this guide does not ingest).
- Store-scoped
apiKey,searchUrl,analyticsUrl,tenantCode, andcollectionrender aswindow.kelpConfig. - Header mini-search is intercepted; Magento catalogsearch is not queried for those submits.
-
catalogsearch_result_index: Magento result list andcatalogsearch.leftnav(or your theme's search layered nav) removed; Kelp listing mounted. - Each category / listing handle you are cutting over: Magento
catalog.leftnavandcategory.products(or equivalents) removed; Kelp browse mounted with the same listing component. - Empty header query is a no-op or browse - never
searchwith emptyq. - Facets request configured fields only; checkbox (and optional price range) re-query with
filters. - Sort and pager send
sort,page, andperPage; UI readsfoundandpage. - Product cards map
hits[].document; PDP href usesurl_key,sku, orid. -
queryIdwritten tosessionStorageon search/browse;search,collection_viewed,product_clicked,product_viewed,product_added_to_cart, andpurchaseemit. - Success page sends
purchasewithsessionId/userId(omitqueryIdunless the cart is a single query).
Verification
- Type a known product term in the header. Network:
POST .../searchwithq,page,perPage, andfacets. Results grid matcheshits. Empty catalog term shows the empty state, not a Magento "your search returned no results" block. - Open a cut-over category. Network:
POST .../browse(noq, nosemanticWeight). Magento layered nav and product list are gone. - Toggle a facet and a price bound. The next request includes
filters(op=/range/>=/<=).facetCountsupdate. Pager usesMath.ceil(found / perPage). - Click a hit:
product_clickedincludesqueryIdandobjectId. PDP loads via your chosenurl_key/sku/idlink.product_viewedfires once. - Add to cart:
product_added_to_cartincludes the storedqueryId. Place an order: success page postspurchasewithorderId,value,currency, anditems[].objectId. - Confirm analytics host is
{analyticsUrl}/analytics/events, not the search host. Batches return 2xx.
Rollback
Keep Magento catalogsearch and category layout files in version control. To roll back a store view:
- Restore the header form to Magento submit (remove the intercept).
- Restore
catalogsearch_result_indexandcatalog_category_view(re-enablesearch.result,category.products, layered nav; remove or disable the Kelp blocks). - Leave
window.kelpConfigin place or gate the island with a store-scoped "Kelp discovery" flag so you can disable JS without a full theme revert. - PDP, cart, checkout, and account do not change, so rollback does not touch checkout.
Do not delete the Magento catalog search indexer as part of Kelp cut-over. You may still need it if you roll back.
Catalog sync is separate
Indexing Magento products into Kelp is not this page. Storefront discovery assumes documents already exist in the collection.
- Shopify merchants: see Catalog sync (Shopify) for credentials, webhooks, and order sync.
- Magento merchants: use your existing catalog pipeline or Kelp admin ingest. This guide does not document a Magento sync module.
Next steps
Search vs browse
When to call search (query) vs browse (listing), and what each accepts.
Filtering and facets
KelpFilter, facetCounts, operators, and price ranges.
Events
Named event kinds, tracker methods, and field reference.
Attribution
Thread queryId from discovery through click and add-to-cart.
Search and browse API
POST body fields, endpoints, and response shape.
Events API
Batch envelope and X-Api-Key on the analytics host.
SDK install
CDN ESM createKelpClient for themes without npm.
Merchandising
Pin, boost, bury, hide without theme changes.