Created
January 10, 2018 19:16
-
-
Save mpelzsherman/f3e729d4eeb870fa486e4f6f985fdaed to your computer and use it in GitHub Desktop.
changes to support Optimizely POC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/apps/shared/Layout/Html.js b/src/apps/shared/Layout/Html.js | |
index dc2444d32..cfb75ba89 100644 | |
--- a/src/apps/shared/Layout/Html.js | |
+++ b/src/apps/shared/Layout/Html.js | |
@@ -36,6 +36,9 @@ export default class HTML extends Component { | |
} | |
const optimizelySrcPath = OPTIMIZELY_SRC_PATHS[view] | |
+ | |
+ const loadOptVariation = optimizelyClient.activate('fullstack_poc', userId) // TODO - make a utility function that knows how to get userId | |
+ | |
/* eslint-disable react/no-danger, import/no-unresolved, import/no-webpack-loader-syntax */ | |
return ( | |
<html lang="en-US"> | |
@@ -72,11 +75,13 @@ export default class HTML extends Component { | |
type="application/javascript" | |
src="https://www.rentpathcode.com/identity/3.0.1/identity.min.js" | |
/> | |
- <script | |
- async | |
- type="application/javascript" | |
- src={optimizelySrcPath} | |
- /> | |
+ {loadOptVariation === 'ClientSideOnly' && | |
+ <script | |
+ async | |
+ type="application/javascript" | |
+ src={optimizelySrcPath} | |
+ /> | |
+ } | |
<script | |
type="application/javascript" | |
dangerouslySetInnerHTML={{ __html: require('raw-loader!./inline-js/svgloader.js') }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment