Send page view after session create.

This commit is contained in:
Mike Cao 2020-07-19 00:31:16 -07:00
parent d8c8df2955
commit 1ca72cbd9c
2 changed files with 5 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -62,7 +62,10 @@ if (script) {
if (!store.getItem(sessionKey)) {
createSession(data).then(success => success && pageView(url, referrer));
} else {
pageView(url, referrer).then(success => !success && createSession(data));
pageView(url, referrer).then(
success =>
!success && createSession(data).then(success => success && pageView(url, referrer)),
);
}
};