With the JS SDK, is it OK to call `identify` on al...
# support
c
With the JS SDK, is it OK to call
identify
on all page views or is there a way to check if its been called already in the current session and conditionally make the call?
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
You can call identify on all pages that are viewed by a logged in user. There is no way to check if the identify has been called in the current session (as the 2 are not tied to each other). If the above is creating too many identify calls, I suggest, you make an identify call under the following conditions - user registers, - user login - user update their profile
c
Thanks @shy-kite-21035. I also notcied that I can pass a page object when calling
identify()
.
Would this result in a duplicate page call if I’m also calling
page()
explicitly?
This is how I’m calling currently…. I’m thinking maybe I’ll skip that
page
object 😄
m
I am not sure you should skip the Page call since, the page call will be made on every page the customer visits and the Identify call will be made only in the above case (user registers, login, profile update)