Merge pull request #657 from Safelite/feature/CSR-514
CSR-514 Add async/await to runExperimentsForTrigger
This commit is contained in:
commit
5771256089
1 changed files with 4 additions and 4 deletions
|
|
@ -62,7 +62,7 @@ const routes = [
|
|||
to.query.fmgPage = pageToRedirectTo;
|
||||
}
|
||||
|
||||
runExperiments(to.query.fmgPage);
|
||||
await runExperiments(to.query.fmgPage);
|
||||
|
||||
// Process funnel cookie.
|
||||
updateOrCreateFunnelCookie();
|
||||
|
|
@ -269,16 +269,16 @@ function arePagePrerequisitesValid(component) {
|
|||
}
|
||||
|
||||
// Run SiteEntry and PageEntry triggers for experiments
|
||||
function runExperiments(nextPage) {
|
||||
async function runExperiments(nextPage) {
|
||||
if (!store.getters.applicationUser.triggeredSiteEntry) {
|
||||
baseMixin.methods.dispatchStoreAction(storeActions.RUN_EXPERIMENTS_FOR_TRIGGER, {
|
||||
await baseMixin.methods.dispatchStoreAction(storeActions.RUN_EXPERIMENTS_FOR_TRIGGER, {
|
||||
userId: getDeviceIdValue(),
|
||||
triggerEvent: experimentTriggers.SITE_ENTRY,
|
||||
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(),
|
||||
triggerEvent: experimentTriggers.PAGE_ENTRY,
|
||||
triggerValue: nextPage
|
||||
|
|
|
|||
Loading…
Reference in a new issue