Troubleshooting
Last changed
What you should see once recapi runs, and for each problem (row missing, empty, the same for everyone, orders or clicks not counted, calls refused) the check that confirms it and the fix.
In short
- Start on the dashboard's Home (
/app). Its first sentence says whether recommendations work, or the one thing to fix first. Under Details, the Get started list and the Data checks say the rest. - Live events shows the latest events a few seconds after they are sent: the quickest way to see what arrives.
- When your site sends no event for a day, or almost none for days, everyone with a login to your shop gets one email. One more comes when events are back to at least half of a usual day. A shop closed on the same days each week gets none for them: only when its next open day stays quiet too.
- Lists work from the first call. Until recapi has trained on your events, they show popular and trending items.
- Without an error handler, the browser library prints one console line per error code with the API's message, and the line ends with the address of its section in errors. Open the browser console first.
- The problems below hold on every platform. Each platform's guide adds its own three: Shopify, WooCommerce, Magento, any website.
flowchart TD
A[Row missing?] -->|yes| B[The row is missing]
A -->|no| C[Row empty?]
C -->|yes| D[Events arrive but lists are empty]
C -->|no| E[Same items for everyone?]
E -->|yes| F[The row shows popular items]
E -->|no| G[Orders or clicks at 0?]
G -->|orders| H[Orders are not counted]
G -->|clicks| I[Clicks are not counted]
After installing
Ten minutes after you install on Shopify, WooCommerce or Magento, a product page shows recapi's row and the quick start says You're live.
| Where | What you see |
|---|---|
| A product page | Scroll down: the row loads as it comes near the screen, up to 4 cards (picture, name, price) in your theme's colours and fonts. A row with nothing to show stays hidden, title and all. |
| Its first card | Once recapi turns it on, a product the shopper opened earlier, marked "You looked at this". |
| Under the row | "Often bought together", once recapi has products for it: what shoppers bought with the product on screen. One request fills both rows, billed as one, and no product is on both. |
| The quick start's steps | Check themselves every 10 seconds while the page is open: Send your first events, Request recommendations and First view from a recommendation turn to Done, then the page says You're live. |
| Live events (/app/events) | Mark your browser first with the quick start's link, so your test is not counted. Add a product to the cart and place a test order: the cart (level 5) and the purchase (level 10) show there. |
Popular items first, then personalised lists
- Popular items show within about a minute of the first views.
- Until recapi has trained on your events, every list falls back to popular and trending items.
- The first training runs within the hour after events arrive; recapi retrains at least once a day after that.
- The Personalised lists line under Data checks says when your shop was last trained.
When "Often bought together" shows its title
The title shows only when one of its cards was added to a cart or bought alongside the product on screen. On a product nobody bought with another yet, the same cards show without it, as more of the row above. A renamed or translated title follows the same rule. Older versions of each integration differ: see your platform's guide.
The row is missing
Most often the theme hides the row's box, or the page has no box at all.
| Cause | Check | Fix |
|---|---|---|
The theme hides an empty box: many themes hide every empty div, so the row never comes into view and never asks for its products. |
On the quick start, Request recommendations stays on Waiting while views arrive. | Keep the (a space) in the box your platform's guide gives. |
| The page has no box where you want the row. | The same step. | Add the box or block your platform's guide names. |
Once the row loads, Request recommendations turns to Done. If it is done but the row is empty, see Events arrive but lists are empty.
Orders are not counted
Carts arrive but purchases don't: the part of your integration that sends orders isn't running.
- Check: the Purchases line under Data checks warns "carts arrive, purchases don't".
- Fix: each platform sends orders its own way (Shopify's pixel, WooCommerce's secret key, Magento's keys): see your platform's guide.
- After the fix: a test order shows on Live events at level 10.
No recommendations yet
The row stays hidden, or the call answers with no items.
| Cause, most likely first | Check | Fix |
|---|---|---|
The page never asks. The row's element is missing, or the code that calls recommend doesn't run. |
The Get started step Request recommendations reads "Waiting: no recommendation served in the last 14 days." | Follow the quick start's step for your platform, then reload a product page. |
| The key is refused. A wrong or revoked key gets 401, a suspended shop 403; the library then answers with an empty list at once. | The browser console shows the API's message; compare the key with the API keys under Set up. | See CORS or key errors. |
| This month's free units are used up. The library then shows popular items, and nothing once popular and trending lists are used up too. | Home's first sentence reads "Your free recommendation requests for this month are used up". | Add a payment method on Usage & billing. |
| recapi knows no item yet. A new shop's lists hold its active items as soon as it has any: an empty catalog gives empty lists. | Set up → Your data: its Items and Active counts. | Send events or your catalog (quick start). |
How long it takes: a list comes back from the first call. It shows the newest items while there are no events, then popular and trending items until the first training (above).
Events arrive but lists are empty
Live events shows your events, but the call answers with items: [].
| Cause, most likely first | Check | Fix |
|---|---|---|
| Closed catalog is on. An item that only events named stays inactive until you describe it, and inactive items are never recommended. | Settings, Only recommend products you have sent us; on Set up → Your data, Active is far below Items. | Send item descriptions (items calls or a platform sync), or turn the setting off. |
A tag filter matches no active item. tagsAny and tagsAll keep only items carrying those tags. |
Set up → Your data, Your items: Top tags (active items). | Use the tags your items really carry, all lowercase. |
| The visitor has seen everything. A visitor's own items are left out of their lists (why), so a busy visitor of a small catalog can run out. | Settings, the option for repeats. | Turn it on where repeats are normal (music, re-orders), or add items. |
| Events stopped creating items. On the free plan, events create at most 50,000 items. | The data check Items created from events on Home. | Send your catalog: items you send never count. Event-made items unseen in events for 90 days drop out by themselves. |
The fallback failed too. The answer has fallback: true and no items: recapi could not answer, and the popular list failed or was refused as well. |
The console line or your error handler, and Home for a quota warning. |
The row shows popular items
Every visitor sees about the same items, their why is popular, trending or more, or the answer has
fallback: true.
| Cause, most likely first | Check | Fix |
|---|---|---|
| recapi hasn't trained yet. | The data check Personalised lists reads "Not trained yet, so lists show popular and trending items until recapi first trains on your events, within the hour after they arrive." How Recapi learns, under Home's details, says when it last trained. | Wait for the first training. |
Events carry no visitor id (no user_id and no anon_id), so recapi can't learn from them. |
Send your first events warns "none with a visitor id", or the data check User ids warns. | Wire your cookie banner to recapi.setConsent(true), or create the client with consent: true if your site needs no banner (consent). The warning shows the fix for your platform. |
| The visitor has no history yet. A first visit to a page with no product, or a visitor with Do Not Track on, gets trending and popular items. | A product page, or a second page after viewing a product, should differ. | None needed. A Similar products row follows the product on screen from the first view. |
| You are in the lift test's popular group. During a lift test, a share of visitors sees popular items by design. | Home's Lift card, under Details, reads "Day N of the test". | None: it is the comparison. |
The library fell back. fallback: true means recapi didn't answer within 1.5 seconds, couldn't be reached, or refused the call for a limit. |
The console line, and Home for a quota warning. | |
| A page cache stores the list, so one visitor's list is shown to everyone. | The data check Page caches reads "One recommendation list is shown to many visitors: a page cache is probably storing it." | Load the list in the browser, or keep the row out of the page cache. |
| The placement is a Trending row. | The placement's list kind on the Lists on your site page. | |
The placement name is misspelled. An unknown name is not an error: such a call gets the default placement's settings, so a row named prodcut shows the default row's items. |
Compare the name in your code with the Lists on your site page. | Use the exact name, or add the placement. |
The visitor id warning
The Send your first events step's full warning reads "Warning: … none with a visitor id (a user_id or an anon_id), so recapi can't learn from them and every visitor sees popular items." It clears with the first event that carries an id. Clicks on cards are credited either way, through the card's link.
A script tag that shows its row reads instead, for its first day, "Working. recapi starts learning once a visitor accepts your cookie banner.": nothing to fix yet.
Clicks are not counted
Home's Viewed after shown stays at 0%, and the Get started step First view from a recommendation reads "Waiting: no recommended item viewed in the last 14 days."
| Cause, most likely first | Check | Fix |
|---|---|---|
| The product page sends no view. A click is counted from the view event on the clicked item. | Open a product from the row, then look for that item at level 3 on Live events. | Send track(itemId, 'view') on every product page (quick start). |
| The view carries no list id. Without consent, credits last for the current page only (attribution). | On Live events, the event's Recommendation column is empty. | Wire your cookie banner to setConsent, or pass the list's recommendation_id in the link. |
| The row showed the fallback. Popular items shown after a failure carry no list id, so their clicks are not credited. | As under The row shows popular items. | |
| The event names the item by another id. The event and the list must use the same item id. | Compare the Item column on Live events with the ids in the list. |
CORS or key errors
The browser console says a call was blocked by CORS policy, or the API answers 401 unauthorized or 403 forbidden.
recapi's API answers browser calls from any site: there is no list of allowed sites to set. The browser library sends
a public key in the URL as ?key=, with no custom header, so the browser sends each call at once, with no permission
request (preflight) first. A CORS error therefore almost always means the call didn't reach recapi's API.
| Cause, most likely first | Check | Fix |
|---|---|---|
The base URL is wrong: it points at your own site or has a typo. When it points at a web page, the library raises invalid_response. |
Compare it with the address the quick start shows. | Use the API address from the quick start. |
| The key is wrong or revoked (401). | The API keys, under Set up, list your keys; a public key stays readable there, and a revoked one shows only its first characters. | Copy an active public key from that page (401). |
A public key on a secret-key call (403). Writing items, reading a user's history and explain need the secret key. |
Make those calls from your server. Never put a secret key in a page: anyone could read it. | |
Your own code adds a header. Without a library, a header other than Authorization, Content-Type or Content-Encoding makes the browser ask first, and the API doesn't allow it. |
Drop the header, or send the public key as ?key= with a text/plain body (authentication). |
|
| The key belongs to another environment, such as a test one. Calls succeed, but your events show only in that environment's dashboard. | The dashboard's environment switcher, which shows once you have two. | Use the production environment's keys on your live site. |
Dashboard check: the Get started step Create an API key says how many public and secret keys you have, and the step Send your first events turns done as soon as the first event arrives with a working key.