Skip to main content

So it turns out that particular ad-blockers like “ublock” block events from being sent to Amplitude so the events just get stored up locally and the Amplitude client seems keep making failed requests with ever growing request bodies. This slows down our app significantly over time until the user clears their local storage. Is there a way to limit the buffer on events that are not sent so it doesn’t get out of hand?

Hi @jsun-m, some content blockers such as uBlock will hinder traffic as you’ve mentioned. We have a couple of different things you can consider.

  1. You can set up a proxy service to relay events downstream to Amplitude: https://www.docs.developers.amplitude.com/analytics/domain-proxy/?h=proxy#sdks

    Sending data through a self-owned proxy service gives you better control of the data you collect and send to the Amplitude platform. Using a proxy service can have these benefits:
  • Ability to toggle event flow to Amplitude.
  • Self-owned audit logging of data.
  • Easier debugging, filtering, and blocking of events.
  • Anonymizing end-users. For example, remove originating IP address, location, userID, and more.
  1. We have some TypeScript SDK logic that users can also pass in their own storageProvider in init(). They could use a “in memory storage” that would only keep the values temporarily in memory (not local storage). i.e: 
amplitude.init('API_KEY', 'example.react.user@amplitude.com', {
storageProvider: new MemoryStorage(),
});

 


Reply