Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 716 Bytes

File metadata and controls

15 lines (8 loc) · 716 Bytes

Stubbing Google Analytics

This is an example showing how to blacklist requests for www.google-analytics.com.

Even though we are preventing the actual GA script from loading, we can still stub the window.ga object and ensure its being called correctly.

Network Requests

This shows how the script is being blocked with a 503 server response code.

screen shot 2017-12-14 at 2 28 49 pm

The response headers also include the rule that caused the blockage.

screen shot 2017-12-14 at 2 28 26 pm