diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-08-16 18:16:52 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-08-17 00:14:03 +0100 |
commit | ddba6e69dc7003c06dad19b994c63b5db711fc2e (patch) | |
tree | 7285fcfed64ea96526866117e1ac9ae17f650904 | |
parent | 0e497596fb9fc9fab0f1bd4e7b813e86dab174df (diff) |
[fixmystreet.com] Don't show things to Page Speed.
-rw-r--r-- | templates/web/fixmystreet.com/header_extra.html | 2 | ||||
-rw-r--r-- | web/cobrands/fixmystreet.com/js.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/web/fixmystreet.com/header_extra.html b/templates/web/fixmystreet.com/header_extra.html index 64a8ee44a..b55abc957 100644 --- a/templates/web/fixmystreet.com/header_extra.html +++ b/templates/web/fixmystreet.com/header_extra.html @@ -2,7 +2,7 @@ <link rel="Shortcut Icon" type="image/x-icon" href="/cobrands/fixmystreet.com/favicon.ico"> [%# We are conducting an A/B experiment %] -[% IF c.config.BASE_URL == "https://www.fixmystreet.com" AND not admin %] +[% IF c.config.BASE_URL == "https://www.fixmystreet.com" AND not admin AND NOT c.req.header('User-Agent').match('Google Page Speed') %] <script src="//www.google-analytics.com/cx/api.js?experiment=ZwMlZkAhSbK_tP_QG64QrQ"></script> <script nonce="[% csp_nonce %]"> var variation = cxApi.chooseVariation(), diff --git a/web/cobrands/fixmystreet.com/js.js b/web/cobrands/fixmystreet.com/js.js index 9dbd11f2c..c54c543de 100644 --- a/web/cobrands/fixmystreet.com/js.js +++ b/web/cobrands/fixmystreet.com/js.js @@ -11,7 +11,7 @@ $(function(){ $.cookie('has_seen_country_message', 1, {expires: 365, path: '/'}); }); - if ( $('body.frontpage').length ) { + if ( $('body.frontpage').length && -1 == navigator.userAgent.indexOf('Google Page Speed')) { if (!$.cookie('has_seen_country_message')) { $.ajax({ url: 'https://gaze.mysociety.org/gaze-rest?f=get_country_from_ip', |