mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Website: Update personalization in custom hook (#17324)
Changes: - Updated the custom hook to not set `req.session.primaryBuyingSituation` as undefined if a user does not have a `utm_content` query parameter.
This commit is contained in:
parent
ea5b8f8204
commit
4ed8a1d24f
1 changed files with 2 additions and 4 deletions
6
website/api/hooks/custom/index.js
vendored
6
website/api/hooks/custom/index.js
vendored
|
|
@ -155,14 +155,12 @@ will be disabled and/or hidden in the UI.
|
|||
req.session.primaryBuyingSituation = req.param('utm_content');
|
||||
// FUTURE: Auto-redirect without the querystring after absorbtion to make it prettier in the URL bar.
|
||||
// (except this probably messes up analytics so before doing that, figure out how to solve that problem)
|
||||
} else {
|
||||
req.session.primaryBuyingSituation = undefined;
|
||||
}
|
||||
}//fi
|
||||
if (req.method === 'GET') {
|
||||
// Include information about the primary buying situation
|
||||
// If set in the session (e.g. from an ad), use the primary buying situation for personalization.
|
||||
res.locals.primaryBuyingSituation = req.session.primaryBuyingSituation || undefined;
|
||||
}
|
||||
}//fi
|
||||
|
||||
// Next, if we're running in our actual "production" or "staging" Sails
|
||||
// environment, check if this is a GET request via some other host,
|
||||
|
|
|
|||
Loading…
Reference in a new issue