| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 33ba260 commit e25f00c
17 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,6 +32,7 @@ declare type ABTest = { | |||
| 32 | 32 | ||
| 33 | 33 | declare type ContributionsABTest = ABTest & { | |
| 34 | 34 | epic: boolean, | |
| 35 | + componentType: OphanComponentType, | ||
| 35 | 36 | campaignId: string, | |
| 36 | 37 | campaignPrefix: string, | |
| 37 | 38 | campaignSuffix: string, | |
@@ -67,6 +68,7 @@ declare type InitContributionsABTest = { | |||
| 67 | 68 | variants: InitContributionsABTestVariant[], | |
| 68 | 69 | ||
| 69 | 70 | epic?: boolean, | |
| 71 | + componentType?: OphanComponentType, | ||
| 70 | 72 | // locations is a filter where empty is taken to mean 'all' | |
| 71 | 73 | locations?: string[], | |
| 72 | 74 | locationCheck?: () => boolean, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -43,7 +43,8 @@ declare type OphanComponentType = | |||
| 43 | 43 | | 'NEWSLETTER_SUBSCRIPTION' | |
| 44 | 44 | | 'SURVEYS_QUESTIONS' | |
| 45 | 45 | | 'ACQUISITIONS_EPIC' | |
| 46 | - | 'ACQUISITIONS_ENGAGEMENT_BANNER'; | ||
| 46 | + | 'ACQUISITIONS_ENGAGEMENT_BANNER' | ||
| 47 | + | 'THANK_YOU_EPIC'; | ||
| 47 | 48 | ||
| 48 | 49 | declare type OphanComponent = {| | |
| 49 | 50 | type: OphanComponentType, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,11 +7,12 @@ const submitComponentEvent = (componentEvent: OphanComponentEvent) => { | |||
| 7 | 7 | ||
| 8 | 8 | export const submitEpicInsertEvent = ( | |
| 9 | 9 | products: OphanProduct[], | |
| 10 | - campaignCode: string | ||
| 10 | + campaignCode: string, | ||
| 11 | + type: OphanComponentType = 'ACQUISITIONS_EPIC' | ||
| 11 | 12 | ) => { | |
| 12 | 13 | submitComponentEvent({ | |
| 13 | 14 | component: { | |
| 14 | - type: 'ACQUISITIONS_EPIC', | ||
| 15 | + type, | ||
| 15 | 16 | labels: [], | |
| 16 | 17 | products, | |
| 17 | 18 | campaignCode, | |
@@ -22,11 +23,12 @@ export const submitEpicInsertEvent = ( | |||
| 22 | 23 | ||
| 23 | 24 | export const submitEpicViewEvent = ( | |
| 24 | 25 | products: OphanProduct[], | |
| 25 | - campaignCode: string | ||
| 26 | + campaignCode: string, | ||
| 27 | + type: OphanComponentType = 'ACQUISITIONS_EPIC' | ||
| 26 | 28 | ) => { | |
| 27 | 29 | submitComponentEvent({ | |
| 28 | 30 | component: { | |
| 29 | - type: 'ACQUISITIONS_EPIC', | ||
| 31 | + type, | ||
| 30 | 32 | labels: [], | |
| 31 | 33 | products, | |
| 32 | 34 | campaignCode, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -220,12 +220,20 @@ const makeABTestVariant = ( | |||
| 220 | 220 | test = noop, | |
| 221 | 221 | impression = submitABTestImpression => | |
| 222 | 222 | mediator.once(parentTest.insertEvent, () => { | |
| 223 | - submitEpicInsertEvent(products, campaignCode); | ||
| 223 | + submitEpicInsertEvent( | ||
| 224 | + products, | ||
| 225 | + campaignCode, | ||
| 226 | + parentTest.componentType | ||
| 227 | + ); | ||
| 224 | 228 | submitABTestImpression(); | |
| 225 | 229 | }), | |
| 226 | 230 | success = submitABTestComplete => | |
| 227 | 231 | mediator.once(parentTest.viewEvent, () => { | |
| 228 | - submitEpicViewEvent(products, campaignCode); | ||
| 232 | + submitEpicViewEvent( | ||
| 233 | + products, | ||
| 234 | + campaignCode, | ||
| 235 | + parentTest.componentType | ||
| 236 | + ); | ||
| 229 | 237 | submitABTestComplete(); | |
| 230 | 238 | }), | |
| 231 | 239 | } = options; | |
@@ -364,6 +372,7 @@ const makeABTest = ({ | |||
| 364 | 372 | ||
| 365 | 373 | // optional params | |
| 366 | 374 | epic = true, | |
| 375 | + componentType = 'ACQUISITIONS_EPIC', | ||
| 367 | 376 | // locations is a filter where empty is taken to mean 'all' | |
| 368 | 377 | locations = [], | |
| 369 | 378 | locationCheck = () => true, | |
@@ -410,6 +419,7 @@ const makeABTest = ({ | |||
| 410 | 419 | dataLinkNames, | |
| 411 | 420 | isEngagementBannerTest, | |
| 412 | 421 | epic, | |
| 422 | + componentType, | ||
| 413 | 423 | campaignId, | |
| 414 | 424 | campaignPrefix, | |
| 415 | 425 | campaignSuffix, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments