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.

Should I use a client-side library or a server-side one when sending data into Segment?

Question

Should I use a client-side library or a server-side one when sending data into Segment?

 

Product

Twilio Segment

 

Environment

Segment Console

 

Answer

There is really no straightforward answer to this question, but these are the instances where we recommend collecting data on the client and on the server:

  • Client-side:
    • Things that you wouldn’t usually store in your database;
    • Things like UTM tags, operating system, device type, or cookied data like returning visitors;
    • When sending data to destinations that can only accept data when the event is sent from the browser.
  • Server-side:
    • When handling payment events;
    • When accuracy is crucial;
    • Things that need to be calculated from a database query;
    • Sensitive information.

 

Additional Information 

More details on client and server-side data collection below:

Have more questions? Submit a request
Powered by Zendesk