Skip to main content

Hello,

I have set up Intercom on my main domain (e.g. https://www.example.com) and I’ve also set it up on my sub domain (e.g. https://sub.example.com). These are two completely separate applications that use the same Intercom workspace for customer support (because they are related to each other in some way). 

A user can create an account on either one of these two subdomains, however these accounts are not “shared”, in the sense that if an account on www.example.com has the same email address with an account on sub.example.com, these accounts have nothing in common; they are stored in different databases and are treated as completely separate entities, which makes sense considering that they are used in different applications.

Here is my issue: On www.example.com and sub.example.com Intercom stores some cookies that I presume are used in the identification of the user. These cookies however have ‘.example.com’ as their domain. The consequences of this are that if a user logs in to their www.example.com account, and then they navigate to sub.example.com where they are not logged in, Intercom assumes that it’s the same user as previously, and the chats that belong to the www.example.com account are displayed. This is an issue because we have different workflows for each website, so when the user navigates to sub.example.com, they will receive messages that are not relevant to the current application. If the user is logged in to both accounts however, then there is no issue and each account has access to its own messages. The problematic case is when only one account is logged in and the other is not.

I have tried implementing some sort of ‘hack’ with Intercom(‘shutdown’), however I realized it is not possible, because even if shutdown is called on the application where the user is not logged in (on sub.example.com), as soon as I navigate to the other domain where the user is logged in (on www.example.com), then the cookies are added again and I have the same problem as before.

Additionally, using the messenger’s domain as a parameter in the workspace’s workflows (meaning that a different workflow is ran depending on whether the user is on sub.example.com or example.com) doesn’t work since it is not related to this issue in any way.

Is there some workaround to this? Is it possible to set the domain of the cookie to be different when the domains are different?

Thanks in advance.

Hi ​@Lampros Staikos have you tried using different brands within the messenger? We have 3 brands in one workspace but they are all kept completely separate meaning there is no cross over in the chat history, so if I go on one site, I can only see my old chats relevant to that brand etc.


Reply