File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
cloud/components/experiments Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 11// Libraries
22import { FC , useEffect , useState } from 'react'
3+ import { useSelector } from 'react-redux'
34
45// Utils
56import { getExperimentVariantId } from 'src/cloud/utils/experiments'
7+ import { event } from 'src/cloud/utils/reporting'
8+
9+ // Selectors
10+ import { getMe } from 'src/me/selectors'
11+ import { getOrg } from 'src/organizations/selectors'
612
713interface Props {
814 /** Experiment ID found in the Measurements and Objectives section of the Google Optimize experiment Details page */
@@ -22,11 +28,26 @@ export const GoogleOptimizeExperiment: FC<Props> = ({
2228 variants,
2329} ) => {
2430 const [ variantID , setExperimentVariantId ] = useState < string > ( '' )
31+ const me = useSelector ( getMe )
32+ const org = useSelector ( getOrg )
2533
2634 useEffect ( ( ) => {
2735 setExperimentVariantId (
2836 getExperimentVariantId ( experimentID , activationEvent )
2937 )
38+
39+ if ( variantID ) {
40+ event (
41+ 'optimize.user_variant' ,
42+ { } ,
43+ {
44+ experiment_id : experimentID ,
45+ variant : variantID ,
46+ user_id : me . id ,
47+ org_id : org . id ,
48+ }
49+ )
50+ }
3051 } )
3152
3253 if ( variantID ) {
Original file line number Diff line number Diff line change @@ -166,8 +166,8 @@ export const GLOBALSEARCH_API_KEY = formatConstant(
166166export const PAYG_CREDIT_DAYS = 30
167167export const PAYG_MAX_CREDIT = 250
168168export const PAYG_CREDIT_EXPERIMENT_ID = process . env . PAYG_CREDIT_EXPERIMENT_ID
169- export const CREDIT_250_EXPERIMENT_ID = 'JVfGg-umSiSk-JVpeh4hGA '
170- export const CREDIT_250_EXPERIENCE_CUTOFF_EPOCH = 1646697600000 // 8 March 2022
169+ export const CREDIT_250_EXPERIMENT_ID = 'M12DrPq9TGO-Pkx4PuOHwA '
170+ export const CREDIT_250_EXPERIENCE_CUTOFF_EPOCH = 1654585200000 // 7 June 2022, 7:00:00 AM GMT
171171
172172export const INFLUXDATA_SUPPORT_CONTACT_UK = '+44 808-196-6148'
173173export const INFLUXDATA_SUPPORT_CONTACT_UK_TELEPHONE_LINK = 'tel:+448081966148'
You can’t perform that action at this time.
0 commit comments