Idlen Logo
Chat SDK

Troubleshooting

Fix common Chat SDK integration issues

Troubleshooting

No ad returned

Check:

  • apiKey starts with idl_pk_
  • sessionId is provided
  • at least one of rawText, contentText, or context.topics is available

Wrong method for the use case

  • Chat messages: fetchAd / getAd
  • Non-chat UI blocks: fetchAdForContent / getAdForContent

Clicks not visible

  • Ensure trackClick is bound to the same link/button that opens ctaUrl.
  • Avoid navigation that bypasses click handlers before tracking can fire.

Debug logs

Enable SDK debug mode:

const ads = new IdlenChatAds({
  apiKey: 'idl_pk_...',
  debug: true
});
Copyright © 2026