Skip to main content
Answered

Duplicate users when using Javascript SDK to track logged-in users

  • June 8, 2021
  • 1 reply
  • 14 views

Hi,

 

I'm having issues with duplicate users appearing in Intercom

 

The problem appears to be isolated to users who were previously leads on Intercom that have an 'email' and 'user_id' attributes. It appears that the user_id attribute is automatically created when they are created as leads.

 

When I use the tracking script as follows:

 

Intercom('boot', {

app_id: 'abc12345',

email: 'john.doe@example.com',

created_at: 1234567890,

name: 'John Doe',

});

 

It creates a new account for the user, presumably because the use cannot be identified by their email.

 

However when I add their user_id into the tracking script - it stops tracking their sessions altogether. Here is the script I'm using for this:

 

Intercom('boot', {

app_id: 'abc12345',

email: 'john.doe@example.com',

created_at: 1234567890,

name: 'John Doe',

});

 

Any ideas how to stop duplicate accounts being created for these users?

Best answer by Roy

Hi @abrar​ 😎 ,

 

When you are providing Intercom user_id or e-mail in JavaScript API it will save it as a user record.

 

If you want to merge existing lead to the user profile, suggesting to take a look at the following article:

Merge lead and user profiles.

 

More information about JavaScript API and Data Attributes can be found here:

Javascript API: Attributes & Objects.

 

I hope this will be helpful, let me know if you have any further questions about this topic.

Always happy to help 😊

 

Best,

Roy

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

1 reply

Forum|alt.badge.img+5
  • Expert User
  • 1152 replies
  • Answer
  • June 8, 2021

Hi @abrar​ 😎 ,

 

When you are providing Intercom user_id or e-mail in JavaScript API it will save it as a user record.

 

If you want to merge existing lead to the user profile, suggesting to take a look at the following article:

Merge lead and user profiles.

 

More information about JavaScript API and Data Attributes can be found here:

Javascript API: Attributes & Objects.

 

I hope this will be helpful, let me know if you have any further questions about this topic.

Always happy to help 😊

 

Best,

Roy


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