Last active
February 26, 2019 17:54
-
-
Save seque1990/00dd254bfc0d6b446f7fdb2cdf84bcd6 to your computer and use it in GitHub Desktop.
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
import React, { Fragment } from 'react'; | |
import { | |
Experiment, | |
Variant, | |
emitter, | |
experimentDebugger, | |
} from '@marvelapp/react-ab-test'; | |
// ... | |
componentDidMount() { | |
this.trackNewQuotePageV1(); | |
} | |
trackNewQuotePageV1 = () => { | |
const activeVariant = emitter.getActiveVariant('New Quote Page, V.1'); | |
experimentDebugger.enable(); | |
window.analytics.track('Experiment Rendered', { | |
'Name': 'New Quote Page, V.1', | |
'Test': activeVariant, | |
}); | |
} | |
// ... | |
<Experiment name="New Quote Page, V.1"> | |
<Variant name="Control"> | |
<QuotesPage {...this.props} /> | |
</Variant> | |
<Variant name="B"> | |
<NewQuotesPage {...this.props} /> | |
</Variant> | |
</Experiment> | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment