SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Do I have to call identify on every page load?

Question

Do I have to call identify on every page load?

 

Product

Twilio Segment

 

Environment 

Segment Console

 

Answer

Calling identify on every page load isn't always necessary, especially if the user has already been identified and their userId hasn’t changed. Calling identify on page load is considered optional because it's generally most useful when:
 

  • A new user is created (and gets a userId)
  • A user logs in or out
  • A user updates profile traits (e.g., name, email, plan)

If the userId remains the same across sessions or page views, repeated identify calls with no trait changes can be redundant. In those cases, adding logic to check local storage or cookies (to avoid duplicate identify calls) is a valid and common approach. Just make sure that if the ID does change, you re-call identify immediately to maintain correct identity stitching and tracking.

 

Additional Information 

Common best practices can be found here.

Have more questions? Submit a request
Powered by Zendesk