SaleSave up to 20% on Pro with code SALE20See pricing →

Conversation Memory

Reading Time: 5 minutes
Download Markdown

Overview

Conversation Memory decides how long the chatbot remembers a visitor’s conversation. You can keep a chat only while the browser tab is open, or let visitors close the browser and continue the same chat when they come back.

The setting is in WPiko AI Chatbot → Chat Widget → Messages → Conversation Memory. It needs WPiko AI Chatbot 2.1.3 or newer and works for both the Floating Chatbot and the shortcode chatbot.

Choosing an Option

Pick an option under Remember conversations and click Save Conversation Memory.

OptionWhat visitors getGood for
Only while the browser tab is openThe chat stays while the visitor moves between pages. Closing the tab, or opening your site in a new tab, starts a new chat.Quick questions, shared or public computers
Across visits, for 24 hours after the last messageThe visitor can close the browser and continue the same chat later the same day.Shops where people come back to finish a purchase
Across visits, for 7 days after the last message (recommended)The same chat, on the same device, for a week after the visitor’s last message.Most websites
Across visits, for 30 days after the last messageThe same chat for a month after the last message.Longer support or sales conversations

New installations use 7 days. Sites that were set up before version 2.1.3 keep Only while the browser tab is open, which is how the chatbot always worked, until you change it.

You can also choose in the Setup Wizard: step 3 has a Remember conversations between visits switch.

How Remembered Conversations Work

  • Same device and browser: the conversation is saved in the visitor’s browser. A different browser or device starts its own chat.
  • Every tab: all open tabs of your site show the same conversation, and a message sent in one tab appears in the others.
  • Counted from the last message: each new message restarts the time. After 24 hours, 7 days or 30 days without a message, the next visit starts a fresh chat. Only viewing pages doesn’t extend it.
  • Start a new chat at any time: visitors use Start New Chat in the chat menu. Since 2.1.3 this replaces “Clear Chat” on every site that kept the default text. You can rename it in Chat Widget → Appearance → Menu Options.
  • Logging in or out: the saved conversation is removed from the browser, so it’s never shown to a different account.
  • The AI remembers too: when the visitor continues, the AI still knows what was said earlier. If OpenAI no longer has the earlier part of the conversation (it keeps it for 30 days), the chatbot sends the recent messages along so the answer still fits.
  • Chat window: whether the chat window is open or closed is still remembered per tab, so the chat doesn’t pop open on its own when the visitor comes back.

Conversations listed under Monitor → Conversations are not affected by this setting. A conversation continued days later stays one conversation in that list.

Live Chat Takeover (Pro)

With Admin Takeover, a remembered conversation keeps its takeover when the visitor comes back, so your team can continue where it left off. If nobody from the team has replied to or opened the conversation for 12 hours, the visitor’s next visit or message hands it back to the AI, with the usual “left the conversation. AI assistant is back.” notice. A visitor coming back later is never left waiting for an answer. This needs WPiko AI Chatbot Pro 2.1.3 or newer.

Privacy

The conversation is kept in the visitor’s browser (local storage) only for the chat they chose to use. It isn’t used for tracking. Anyone using the same browser can see it until it expires or is cleared, so on shared computers, such as a library or a shop terminal, Only while the browser tab is open is the safer choice.

If you remember conversations across visits, say so in your privacy policy. For example:

When you use the chat, your conversation is kept in your browser’s local storage so you can continue it later on this device. It’s removed 7 days after your last message, when you start a new chat from the chat menu, or when you log in or out.

Change “7 days” to the option you chose. See Data Handling for everything else the chatbot stores.

Troubleshooting

  • The chat starts fresh every time: check that an “Across visits” option is saved. Private windows and browsers set to clear site data on exit forget the chat when they close, and a different browser or device always starts its own chat.
  • The change doesn’t show on the site: saving the setting clears common caching plugins automatically (see Cache-Busting System). If you use a host or CDN cache, such as Cloudflare, purge it too.
  • A visitor’s chat disappeared: it expired after the chosen time without a message, the visitor started a new chat, or they logged in or out.
  • Testing: open your site in a normal window, send a message, close the browser and open the site again. The conversation should still be there.

For Developers

The wpiko_chatbot_conversation_memory_days filter changes how many days a conversation is remembered after its last message. Return 0 to keep it only while the tab is open. Values above 30 are lowered to 30, because OpenAI keeps conversation state for 30 days.

add_filter( 'wpiko_chatbot_conversation_memory_days', function ( $days ) {
    return 14; // Remember conversations for 14 days after the last message.
} );

In the browser, window.wpikoChatbotStore reads and writes the visitor’s conversation wherever the setting keeps it (get, set, clearConversation, isPersistent). Use it in add-ons instead of reading sessionStorage directly. In WPiko AI Chatbot Pro, the wpiko_chatbot_pro_takeover_auto_release_hours filter changes the 12-hour takeover limit (0 = never). See Developer Hooks and Filters for more.

Have a Question?