Skip to content

Commit 076c2e2

Browse files
Merge pull request #8862 from cfpb/ans_remove_optimizely
Remove google optimize legacy code cruft and AB_TESTING flag
2 parents fe7390b + 630224b commit 076c2e2

3 files changed

Lines changed: 1 addition & 28 deletions

File tree

cfgov/cfgov/settings/base.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,6 @@
501501
"*.googleanalytics.com",
502502
"*.google-analytics.com",
503503
"*.googletagmanager.com",
504-
"*.googleoptimize.com",
505-
"optimize.google.com",
506504
"api.mapbox.com",
507505
"js-agent.newrelic.com",
508506
"bam.nr-data.net",
@@ -524,7 +522,6 @@
524522
"'unsafe-inline'",
525523
"*.consumerfinance.gov",
526524
"*.googletagmanager.com",
527-
"optimize.google.com",
528525
"fonts.googleapis.com",
529526
"api.mapbox.com",
530527
"www.ssa.gov/accessibility/andi/",
@@ -539,7 +536,6 @@
539536
"img.youtube.com",
540537
"*.google-analytics.com",
541538
"*.googletagmanager.com",
542-
"optimize.google.com",
543539
"api.mapbox.com",
544540
"*.tiles.mapbox.com",
545541
"blob:",
@@ -557,8 +553,6 @@
557553
"*.consumerfinance.gov",
558554
"*.googletagmanager.com",
559555
"*.google-analytics.com",
560-
"*.googleoptimize.com",
561-
"optimize.google.com",
562556
"www.youtube.com",
563557
"*.qualtrics.com",
564558
"mailto:",
@@ -572,7 +566,6 @@
572566
"'self'",
573567
"*.consumerfinance.gov",
574568
"*.google-analytics.com",
575-
"*.googleoptimize.com",
576569
"*.tiles.mapbox.com",
577570
"api.mapbox.com",
578571
"bam.nr-data.net",
@@ -610,10 +603,6 @@
610603
"CFPB_RECRUITING": [],
611604
# When enabled, display a "technical issues" banner on /complaintdatabase
612605
"CCDB_TECHNICAL_ISSUES": [],
613-
# Google Optimize code snippets for A/B testing
614-
# When enabled this flag will add various Google Optimize code snippets.
615-
# Intended for use with path conditions.
616-
"AB_TESTING": [],
617606
# Manually enabled when Beta is being used for an external test.
618607
# Controls the /beta_external_testing endpoint, which Jenkins jobs
619608
# query to determine whether to refresh Beta database.

cfgov/v1/jinja2/v1/layouts/base.html

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -182,22 +182,6 @@
182182
{# Don't load certain scripts in the Wagtail preview panel. -#}
183183
{% if not request.in_preview_panel %}
184184

185-
{% if flag_enabled('AB_TESTING') %}
186-
{# Begin Google Optimize #}
187-
{# Optimize anti-flicker snippet. #}
188-
<style>.async-hide { opacity: 0 !important} </style>
189-
<script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
190-
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
191-
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
192-
})(window,document.documentElement,'async-hide','dataLayer',4000,
193-
{'GTM-KMMLRS':true});</script>
194-
{#
195-
NOTE: We don't include the googleoptimize.com/optimize.js script call here
196-
because we are including optimize via GTM.
197-
#}
198-
{# End Google Optimize #}
199-
{% endif %}
200-
201185
{# Begin Google Tag Manager #}
202186
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
203187
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],

docs/feature-flags.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ FLAGS = {
3030
}
3131
```
3232

33-
By convention our flag names are all uppercase, with underscores instead of whitespace. A comment is expected above each flag with a short description fo what happens when it is enabled.
33+
By convention our flag names are all uppercase, with underscores instead of whitespace. A comment is expected above each flag with a short description of what happens when it is enabled.
3434

3535
## Checking a flag
3636

0 commit comments

Comments
 (0)