Open goranculibrk opened 5 years ago
Actually, after a little bit of digging, figured it out. I was using blocked-url-patterns
instead of blockedUrlPatterns
.
The full code that's working properly from what I can see is:
"lighthouseFlags": { "output": ["html", "csv"], "emulatedFormFactor": "desktop", "blockedUrlPatterns": [ "www.google-analytics.com/analytics.js" ] }
You could just filter your traffic from analytics...
Hi there, I'm trying to pass an argument to the lighthouse, which would block Google Analytics. Here's the code from config.json.
"lighthouseFlags": { "output": ["html", "csv"], "emulatedFormFactor": "desktop", "blocked-url-patterns": [ "*www.google-analytics.com/analytics.js*" ] }
Based on Lighthouse documentation, it's possible to pass that argument. I've tried passing just the URL, without brackets, it didn't work, then I tried using the brackets without the asterisk and it didn't help. Any idea how to block requests for this url: www.google-analytics.com/analytics.js?
My goal is to perform audit reports but without notifying google analytics about it, since running 100-200 tests on websites that have maybe 1, 2000 monthly visitors would mess the data.