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 Can You Prevent Events From Being Sent for Specific IP Addresses?

Question

How can I prevent Analytics.js from sending events to Segment for users coming from specific IP addresses?

 

Product

Segment

 

Environment

Segment Console

 

Answer

Segment does not provide a built-in feature to block events from specific IP addresses. However, if you have access to the code where Analytics.js is implemented, you can use a Source Middleware function. Middlewares allow you to run custom JavaScript on every event before it is sent to Segment. By adding logic to check the user’s IP address, you can prevent events from being sent if they match a blocked list. 

 

Additional Information 

Source and Destination Middlewares are available on Analytics.js snippet version 4.12.0 and later.

Have more questions? Submit a request
Powered by Zendesk