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.

How to Filter Events at the Segment Source Level

Question

How can I filter out high-volume events from a specific user at the Segment Source level?

 

Product

Twilio Segment

 

Environment

Segment Console

 

Answer

Events from a specific user or group can be stopped from ingesting into Segment using a Source Insert Function. Source Insert Functions allow you to execute custom code to inspect and transform event payloads before they are fully processed by the Segment ingestion pipeline.

By deploying an insert function on your source, you can check specific payload properties, such as context.groupId or userId. If the property matches the specific user you want to block, you can programmatically drop the event by returning null

 

Additional Information

For more details on creating and deploying this code, refer to the Segment Documentation: Source Insert Functions.

 

Have more questions? Submit a request
Powered by Zendesk