mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 10:12:00 +08:00
fix(welcome): pass utm on to welcome
This commit is contained in:
parent
3ed9ca6058
commit
4c0da37b00
2 changed files with 11 additions and 3 deletions
|
@ -67,10 +67,18 @@ export function buildGmailAuthURL(sessionKey) {
|
|||
});
|
||||
}
|
||||
|
||||
export function buildWelcomeURL(welcomeRoot) {
|
||||
export function buildWelcomeURL(welcomeRoot, {source}) {
|
||||
const identityId = IdentityStore.identityId();
|
||||
if (!identityId) { NylasEnv.reportError(new Error("buildWelcomeURL: Can't find Nylas ID")) }
|
||||
return `${welcomeRoot}/welcome?n=${base64url(identityId)}`
|
||||
const query = {
|
||||
n: base64url(identityId),
|
||||
utm_medium: "N1",
|
||||
}
|
||||
if (source) { query.utm_source = source }
|
||||
return url.format({
|
||||
pathname: `${welcomeRoot}/welcome`,
|
||||
query: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function runAuthRequest(accountInfo) {
|
||||
|
|
|
@ -77,7 +77,7 @@ class OnboardingStore extends NylasStore {
|
|||
*/
|
||||
_openWelcomePage() {
|
||||
// open the external welcome page
|
||||
const url = buildWelcomeURL(this.welcomeRoot);
|
||||
const url = buildWelcomeURL(this.welcomeRoot, {source: "OnboardingStore"});
|
||||
shell.openExternal(url, {activate: false});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue