mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-24 00:29:53 -05:00
Block AMP analytics JS script
AMP analytics is part of Google analytics. We need to block it for similar reasons. AMP analytics reference: https://developers.google.com/analytics/devguides/collection/amp-analytics/
This commit is contained in:
parent
8107abd804
commit
6bd4fd6532
@ -354,11 +354,12 @@ class Browser:
|
||||
self.send_to_chrome(method='ServiceWorker.enable')
|
||||
self.send_to_chrome(method='ServiceWorker.setForceUpdateOnPageLoad')
|
||||
|
||||
# disable google analytics
|
||||
# disable google analytics and amp analytics
|
||||
self.send_to_chrome(
|
||||
method='Network.setBlockedURLs',
|
||||
params={'urls': ['*google-analytics.com/analytics.js',
|
||||
'*google-analytics.com/ga.js']})
|
||||
'*google-analytics.com/ga.js',
|
||||
'*cdn.ampproject.org/*/amp-analytics*.js']})
|
||||
|
||||
def stop(self):
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user