feat: send page event for welcome page (#328)
Also, added a new optimizely event to capture total registrations.
This commit is contained in:
@@ -446,9 +446,15 @@ class RegistrationPage extends React.Component {
|
||||
|
||||
if (this.props.registrationResult.success) {
|
||||
setSurveyCookie('register');
|
||||
// Fire optimizely event
|
||||
window.optimizely = window.optimizely || [];
|
||||
|
||||
// Fire optimizely events
|
||||
window.optimizely.push({
|
||||
type: 'event',
|
||||
eventName: 'van_504_total_registrations',
|
||||
});
|
||||
|
||||
if (this.state.optimizelyExperimentName !== 'progressive_profiling_phase1') {
|
||||
window.optimizely = window.optimizely || [];
|
||||
window.optimizely.push({
|
||||
type: 'event',
|
||||
eventName: 'van_504_conversion_rate',
|
||||
|
||||
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
||||
import { Helmet } from 'react-helmet';
|
||||
|
||||
import { getConfig } from '@edx/frontend-platform';
|
||||
import { sendPageEvent } from '@edx/frontend-platform/analytics';
|
||||
import {
|
||||
ensureAuthenticatedUser, hydrateAuthenticatedUser, getAuthenticatedUser,
|
||||
} from '@edx/frontend-platform/auth';
|
||||
@@ -35,6 +36,7 @@ const WelcomePage = (props) => {
|
||||
|
||||
if (props.location.state && props.location.state.registrationResult) {
|
||||
setRegistrationResult(props.location.state.registrationResult);
|
||||
sendPageEvent('login_and_registration', 'welcome');
|
||||
}
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user