@@ -593,7 +607,7 @@ class RegistrationPage extends React.Component {
}}
/>
- {getConfig().REGISTRATION_OPTIONAL_FIELDS && this.state.optimizelyExperimentName !== 'hide_optional_fields' ? (
+ {getConfig().REGISTRATION_OPTIONAL_FIELDS && this.state.optimizelyExperimentName !== 'progressive_profiling_phase1' ? (
{
});
it('should not show optional field check when optimizely experiment is set', () => {
- window.optimizelyExperimentName = 'hide_optional_fields';
+ window.optimizelyExperimentName = 'progressive_profiling_phase1';
const registrationPage = mount(reduxWrapper());
- expect(registrationPage.find('RegistrationPage').state('optimizelyExperimentName')).toEqual('hide_optional_fields');
+ expect(registrationPage.find('RegistrationPage').state('optimizelyExperimentName')).toEqual('progressive_profiling_phase1');
expect(registrationPage.find('#optional').length).toEqual(0);
delete window.optimizelyExperimentName;
diff --git a/src/welcome/WelcomePage.jsx b/src/welcome/WelcomePage.jsx
index 616dec7c..f971c508 100644
--- a/src/welcome/WelcomePage.jsx
+++ b/src/welcome/WelcomePage.jsx
@@ -61,8 +61,17 @@ const WelcomePage = (props) => {
})),
});
+ const fireOptimizelyEvent = () => {
+ window.optimizely = window.optimizely || [];
+ window.optimizely.push({
+ type: 'event',
+ eventName: 'van_504_conversion_rate',
+ });
+ };
+
const handleSubmit = (e) => {
e.preventDefault();
+ fireOptimizelyEvent();
if (registrationResult.success) {
window.location.href = registrationResult.redirectUrl;
}
@@ -71,11 +80,20 @@ const WelcomePage = (props) => {
const handleSkip = (e) => {
e.preventDefault();
+ fireOptimizelyEvent();
window.location.href = registrationResult.redirectUrl;
return null;
};
+
const onChangeHandler = (e) => {
setValues({ ...values, [e.target.name]: e.target.value });
+ if (e.target.value) {
+ window.optimizely = window.optimizely || [];
+ window.optimizely.push({
+ type: 'event',
+ eventName: `van_504_${e.target.name}`,
+ });
+ }
};
return (