CSR-514 Add async/await to runExperimentsForTrigger
This commit is contained in:
parent
1216b121a8
commit
080d2ac28e
1 changed files with 4 additions and 4 deletions
|
|
@ -62,7 +62,7 @@ const routes = [
|
||||||
to.query.fmgPage = pageToRedirectTo;
|
to.query.fmgPage = pageToRedirectTo;
|
||||||
}
|
}
|
||||||
|
|
||||||
runExperiments(to.query.fmgPage);
|
await runExperiments(to.query.fmgPage);
|
||||||
|
|
||||||
// Process funnel cookie.
|
// Process funnel cookie.
|
||||||
updateOrCreateFunnelCookie();
|
updateOrCreateFunnelCookie();
|
||||||
|
|
@ -269,16 +269,16 @@ function arePagePrerequisitesValid(component) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run SiteEntry and PageEntry triggers for experiments
|
// Run SiteEntry and PageEntry triggers for experiments
|
||||||
function runExperiments(nextPage) {
|
async function runExperiments(nextPage) {
|
||||||
if (!store.getters.applicationUser.triggeredSiteEntry) {
|
if (!store.getters.applicationUser.triggeredSiteEntry) {
|
||||||
baseMixin.methods.dispatchStoreAction(storeActions.RUN_EXPERIMENTS_FOR_TRIGGER, {
|
await baseMixin.methods.dispatchStoreAction(storeActions.RUN_EXPERIMENTS_FOR_TRIGGER, {
|
||||||
userId: getDeviceIdValue(),
|
userId: getDeviceIdValue(),
|
||||||
triggerEvent: experimentTriggers.SITE_ENTRY,
|
triggerEvent: experimentTriggers.SITE_ENTRY,
|
||||||
triggerValue: applicationConfig.SITE_ENTRY_TRIGGER_VALUE
|
triggerValue: applicationConfig.SITE_ENTRY_TRIGGER_VALUE
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
baseMixin.methods.dispatchStoreAction(storeActions.RUN_EXPERIMENTS_FOR_TRIGGER, {
|
await baseMixin.methods.dispatchStoreAction(storeActions.RUN_EXPERIMENTS_FOR_TRIGGER, {
|
||||||
userId: getDeviceIdValue(),
|
userId: getDeviceIdValue(),
|
||||||
triggerEvent: experimentTriggers.PAGE_ENTRY,
|
triggerEvent: experimentTriggers.PAGE_ENTRY,
|
||||||
triggerValue: nextPage
|
triggerValue: nextPage
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue