Skip to main content
Answered

Is it possible to update the anonymous_id parameter of the contact object?


Hi there everyone, 

At the moment, under the hood, the Intercom messenger is sending requests with an anonymous_id field when it is tracking Leads on our website. Is there a way of updating this anonymous_id property ?

 

At the moment when an event is tracked it makes an API call to

POST https://api-iam.intercom.io/messenger/web/events

and I can see part of the request payload:

I believe this anonymous_id also corresponds to one of the Intercom tracking cookies: intercom-id-<APP_ID> and also the visitorId ? I'm trying to update the value of this anonymous_id but not sure how to accomplish this. Do I need to overwrite the value of the Intercom cookie in order to achieve this ? Some help would be much appreciated. Cheers

Best answer by Eric Fitz

Thanks for clarifying for me, @mitchell l12​. The only unique identifier that can be associated with a lead object, be it through the API or through our JS snippet, is an email address.

 

It's still possible to create a new lead without accessing the anonymous_id parameter.

View original
Did this topic help you find an answer to your question?

3 replies

Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • March 30, 2021

Hey @mitchell l11​, it's not something that we currently allow to be updated via the API, as it's not a parameter we expose to any update calls. Can I ask for a bit more information about your use case here? Why exactly are you looking to update this value?


  • New Participant
  • 1 reply
  • March 30, 2021

Hi @eric f11​ 

At the moment, we have several ways of tracking contacts. So if somebody signs up with their email on our site then we will manually write a new Lead record into our Intercom workspace by calling the Intercom API ourselves. This means we need to update the Frontend tracking id / cookies info so that when tracking events are fired they are then sent to the new Lead record. We want to do this without converting the Lead into a User ( this should only happen when a contact starts "using" our product - something that is defined in our domain.

I thought the only way of doing this would be alter to the anonymous_id which always seems to be in the user_data part of the request payload whenever the Intercom messengers makes an API call.


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • Answer
  • March 30, 2021

Thanks for clarifying for me, @mitchell l12​. The only unique identifier that can be associated with a lead object, be it through the API or through our JS snippet, is an email address.

 

It's still possible to create a new lead without accessing the anonymous_id parameter.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings