Title: PHP Session Cookie
Last modified: January 26, 2024

---

# PHP Session Cookie

 *  Resolved [modular2740](https://wordpress.org/support/users/modular2740/)
 * (@modular2740)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/php-session-cookie/)
 * Right now when I have the plugin installed and active (but not embedded the chatbot
   anywhere on the site) the chatbot creates a session cookie (e.g.: PHPSESSID:”
   indp34u7rdaj3neh9r0mkophgt”)
   The site I’m maintaining is currently using no cookies
   at all and I’d like to keep it like this for regular site visitors. I want to
   have a seperate section of the site, that requires users to login and there they
   have access to the chat, and only on that single page should the chatbot “initialize”
   and not on any other pages. Is that possible in any way? Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [kognetiks](https://wordpress.org/support/users/kognetiks/)
 * (@kognetiks)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/php-session-cookie/#post-17375290)
 * Hello [modular2740](https://wordpress.org/support/users/modular2740/) (@modular2740),
 * The chatbot creates a PHPSESSID in order to log the link the conversation between
   the bot and the visitor in the conversation log.
 * If the user is logged in, then the WP user id is used to link conversation instead
   of the session id.
 * Without either the session id or user id, then reading the conversation log would
   be difficult. You wouldn’t know which bot response was associated with which 
   user input.
 * The PHP session id is also used to deterime the chatbot styling and assistant
   of the page the visitor or logged in user is accessing.
 * This was the approach I choose to ensure visitor and bot conversations stayed
   seperated among each other.
 * The session id has an Expires / Max-Age of “Session”, which should theoretically
   mean that when the browser is closed, the PHP id will be erased.
 * As for have the bot display only when visitors are logged in, I really like that
   idea. It would likely be a global setting to check if the user is logged in or
   not, if so present the chatbot, otherwise don’t present the chatbot.
 * I like this idea so much, that I’ll make every effort to get it into the next
   release of the chatbot.
 * Let me know if you have fruther questions/comments about the PHPSESSID.
 * Thank you for taking the time to share your valuable feedback, as it helps me
   continually improve and provide a better experience for our users.
    -  This reply was modified 2 years, 4 months ago by [kognetiks](https://wordpress.org/support/users/kognetiks/).
 *  Thread Starter [modular2740](https://wordpress.org/support/users/modular2740/)
 * (@modular2740)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/php-session-cookie/#post-17375318)
 * Thank you for your detailed reply and explanation! Right now I have no further
   questions or comments. Have a great day

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP Session Cookie’ is closed to new replies.

 * ![](https://ps.w.org/chatbot-chatgpt/assets/icon-128x128.png?rev=2890745)
 * [Kognetiks Chatbot for WordPress](https://wordpress.org/plugins/chatbot-chatgpt/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/chatbot-chatgpt/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/chatbot-chatgpt/)
 * [Active Topics](https://wordpress.org/support/plugin/chatbot-chatgpt/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/chatbot-chatgpt/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/chatbot-chatgpt/reviews/)

## Tags

 * [PHPSESSID](https://wordpress.org/support/topic-tag/phpsessid/)

 * 2 replies
 * 2 participants
 * Last reply from: [modular2740](https://wordpress.org/support/users/modular2740/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/php-session-cookie/#post-17375318)
 * Status: resolved