# Hubspot 'identify user' doesn't work consistently

**URL:** <https://community.hubspot.com/t/hubspot-identify-user-doesnt-work-consistently/76745>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [March 8, 2023, 4:06pm UTC](https://community.hubspot.com/t/hubspot-identify-user-doesnt-work-consistently/76745 "2023-03-08T16:06:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicole9](https://avatars.discourse-cdn.com/v4/letter/n/b3f665/32.png) [@Nicole9](https://community.hubspot.com/u/Nicole9)\
**Post date:** [March 8, 2023, 4:06pm UTC](https://community.hubspot.com/t/hubspot-identify-user-doesnt-work-consistently/76745/1 "2023-03-08T16:06:27Z")

</div>

We want to identify our logged in users to hubspot’s chatbot, so that custom chatflows can be displayed to users based on hubspot segmented lists.

```lia-code-sample
<script>
 var _hsq = window._hsq = window._hsq || [];
 _hsq.push(["identify", {
 email: 'test@test.com'
 }]);
 _hsq.push(['trackPageView']);
</script>
<script type="text/javascript" id="hs-script-loader" defer src="//js.hs-scripts.com/..."></script>

```

The code above doesn’t work consistently (sometimes it displays the custom chatbot, sometimes it displays the regular chatbot.)  
I think the issue might be related to the hubspot cookies, because after manually clearing them, the custom chatbot loads correctly.  
(the cookies being cleared are \_\_hstc, \_\_hssrc, \_\_hssc and hubspotutk)

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [March 9, 2023, 9:59pm UTC](https://community.hubspot.com/t/hubspot-identify-user-doesnt-work-consistently/76745/2 "2023-03-09T21:59:50Z")

</div>

Hi, @Nicole9 👋 Do you have a link to your site? Without seeing the issue or having additional details, it is challenging for our community members to offer suggestions.

Best,

Jaycee
