Merge pull request #157 from vbanos/block-amp-analytics

Block AMP analytics JS script
This commit is contained in:
Noah Levitt 2019-07-18 11:07:09 -07:00 committed by GitHub
commit 726c6effed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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):
'''