Skip to main content

Hi,

 

I'm trying to install intercom onto my site for non signed in users. I've followed the instructions here: https://www.intercom.com/help/en/articles/167-install-intercom-on-your-website-to-engage-logged-out-visitors/p>

 

and it seems to half work but there's definitely something wrong. The chat window loads up and it's possible for me to send a message which makes its way to the inbox. However if I try to access the visitor ID with:

Intercom('getVisitorId')

it returns "undefined".

 

If I reload the webpage then my conversation history is gone and I see a background POST request in the web console that receives a 404 response (asterisks added for redaction of possibly sensitive info):

 

POST https://api-iam.eu.intercom.io/messenger/web/conversations/1************4

 

REQUEST
BODY:

 

app_id: m*******d

v: 3

g: undefined

s: dd*********************************b7

r:

platform: web

Idempotency-Key: 82************41

internal:

is_intersection_booted: null

page_title: MyPage

user_active_company_id: undefined

user_data: {}

self_serve_suggestions_match: false

client_assigned_uuid: null

referer: http://****.com/whatever/code>

Any idea what the problem may be?

After further investigation I think what may be happening is the intercom widget is getting a bit confused as I have been testing with both my test workspace/app_id and also my prod one on the same site meaning I had a mix of intercom cookies from both apps.

 

I guess the widget doesn't check to make sure it uses the cookie relative to the app_id it is currently in use for? Obviously this is an unusual use case, but it's probably worth updating the widget to fix this issue in the future


Hey @dan p12​ ! Oséas here from the Customer Support Specialist team 🕵️

 

We scope cookies to a workspace level for cases where Messengers associated with different workspaces might be installed on subdomains of the same domain. So that shouldn't be the problem in this case.

 

Are you using different app_id for both your test and prod workspaces when testing it?


Reply