mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Handbook: Make the website feel more like home (#17317)
Further personalization for folks arriving from ads, so that the site makes more sense to them --------- Co-authored-by: Eric <eashaw@sailsjs.com>
This commit is contained in:
parent
ef26e14f5a
commit
ea5b8f8204
4 changed files with 27 additions and 15 deletions
|
|
@ -25,9 +25,7 @@ module.exports = {
|
|||
|
||||
fn: async function () {
|
||||
|
||||
return {
|
||||
primaryBuyingSituation: this.req.session.primaryBuyingSituation || undefined // if set in the session (e.g. from an ad) use the primary buying situation to personalize that sweet, sweet homepage
|
||||
};
|
||||
return {};
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
14
website/api/hooks/custom/index.js
vendored
14
website/api/hooks/custom/index.js
vendored
|
|
@ -153,10 +153,16 @@ will be disabled and/or hidden in the UI.
|
|||
// If this is set to something weird, then we silently ignore it.
|
||||
// Modify the active session instance. (This will be persisted when the response is sent.)
|
||||
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)
|
||||
}//fi
|
||||
} else {
|
||||
req.session.primaryBuyingSituation = undefined;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
// Next, if we're running in our actual "production" or "staging" Sails
|
||||
// environment, check if this is a GET request via some other host,
|
||||
|
|
@ -272,6 +278,10 @@ will be disabled and/or hidden in the UI.
|
|||
res.locals.isBillingEnabled = sails.config.custom.enableBillingFeatures;
|
||||
res.locals.isEmailVerificationRequired = sails.config.custom.verifyEmailAddresses;
|
||||
|
||||
// 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
|
||||
|
||||
return next();
|
||||
|
|
|
|||
2
website/config/routes.js
vendored
2
website/config/routes.js
vendored
|
|
@ -17,8 +17,6 @@ module.exports.routes = {
|
|||
action: 'view-homepage-or-redirect',
|
||||
locals: {
|
||||
isHomepage: true,
|
||||
pageTitleForMeta: 'Fleet | Open-source device management',
|
||||
pageDescriptionForMeta: 'Open-source device management and security for teams with thousands of laptops and servers. (macOS, Windows, Linux, ChromeOS)'
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
22
website/views/layouts/layout.ejs
vendored
22
website/views/layouts/layout.ejs
vendored
|
|
@ -8,24 +8,30 @@
|
|||
var hideHeaderLinks;// Hides the header navigation links.
|
||||
var hideFooterLinks;// Hides footer links, reduces the height of the footer to 60px;
|
||||
var showAdminLinks;// Shows links to admin pages to admin users.
|
||||
|
||||
// Applies personalization for who people come from ads, so that the website makes more sense for them:
|
||||
var primaryBuyingSituation;
|
||||
var defaultMetaTitle = 'Fleet | Open-source '+(primaryBuyingSituation === 'mdm' ? 'device management' : primaryBuyingSituation === 'vm' ? 'vulnerability management' : 'endpoint ops');
|
||||
var defaultMetaDescription = 'Open-source '+(['mdm'].includes(primaryBuyingSituation) ? 'IT' : ['eo-security','vm'].includes(primaryBuyingSituation) ? 'security' : 'IT and security')+' for teams with lots of '+(primaryBuyingSituation === 'mdm' ? 'computers. (macOS, Windows, Linux, ChromeOS)' : 'workstations and servers. (Linux, macOS, Windows, cloud, data center, OT/ICS, Chrome)');
|
||||
var corporationDisplayName = 'Fleet' + (primaryBuyingSituation === 'mdm' ? ' Device Management' : '') + ' Inc.'; // « Fleet has a DBA as "Fleet", with an official Delaware corporation name of "Fleet Device Management Inc". -mikermcneil, 2024-03-01
|
||||
%><!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><%= typeof pageTitleForMeta !== 'undefined' ? pageTitleForMeta : 'Fleet | Open-source device management' %></title>
|
||||
<meta name="description" content="<%= typeof pageDescriptionForMeta !== 'undefined' ? pageDescriptionForMeta : 'Open-source device management and security for teams with thousands of laptops and servers. (macOS, Windows, Linux, ChromeOS)' %>" />
|
||||
<title><%= typeof pageTitleForMeta !== 'undefined' ? pageTitleForMeta : defaultMetaTitle %></title>
|
||||
<meta name="description" content="<%= typeof pageDescriptionForMeta !== 'undefined' ? pageDescriptionForMeta : defaultMetaDescription %>" />
|
||||
|
||||
<% /* Viewport tag for sensible mobile support */ %>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<%// Twitter meta tags%>
|
||||
<meta name="twitter:card" content="<%= typeof pageImageForMeta !== 'undefined' ? 'summary_large_image' : 'summary' %>" />
|
||||
<meta name="twitter:site" content="https://fleetdm.com" />
|
||||
<meta name="twitter:description" content="<%= typeof pageDescriptionForMeta !== 'undefined' ? pageDescriptionForMeta : 'Open-source device management and security for teams with thousands of laptops and servers. (macOS, Windows, Linux, ChromeOS)' %>" />
|
||||
<meta name="twitter:title" content="<%= typeof pageTitleForMeta !== 'undefined' ? pageTitleForMeta : 'Fleet | Open-source device management' %>" />
|
||||
<meta name="twitter:description" content="<%= typeof pageDescriptionForMeta !== 'undefined' ? pageDescriptionForMeta : defaultMetaDescription %>" />
|
||||
<meta name="twitter:title" content="<%= typeof pageTitleForMeta !== 'undefined' ? pageTitleForMeta : defaultMetaTitle %>" />
|
||||
<meta name="twitter:image" content="<%= typeof pageImageForMeta !== 'undefined' ? 'https://fleetdm.com' + pageImageForMeta : 'https://fleetdm.com/images/fleet-logo-white-square-1200x1200@2x.png' %>" />
|
||||
<%// Meta tags for other social previews %>
|
||||
<meta property="og:image" content="<%= typeof pageImageForMeta !== 'undefined' ? 'https://fleetdm.com' + pageImageForMeta : 'https://fleetdm.com/images/fleet-cloud-city-1200x627@2x.png' %>" />
|
||||
<meta property="og:title" content="<%= typeof pageTitleForMeta !== 'undefined' ? pageTitleForMeta : 'Fleet | Open-source device management' %>" />
|
||||
<meta property="og:description" content="<%= typeof pageDescriptionForMeta !== 'undefined' ? pageDescriptionForMeta : 'Open-source device management and security for teams with thousands of laptops and servers. (macOS, Windows, Linux, ChromeOS)' %>" />
|
||||
<meta property="og:title" content="<%= typeof pageTitleForMeta !== 'undefined' ? pageTitleForMeta : defaultMetaTitle %>" />
|
||||
<meta property="og:description" content="<%= typeof pageDescriptionForMeta !== 'undefined' ? pageDescriptionForMeta : defaultMetaDescription %>" />
|
||||
<% /* Script tags should normally be included further down the page- but any
|
||||
scripts that load fonts (e.g. Fontawesome ≥v5) are special exceptions to the
|
||||
rule. (Include them up here along with any hard-coded «link» tags for Typekit,
|
||||
|
|
@ -339,7 +345,7 @@
|
|||
<a purpose="footer-trust-link" class="d-flex flex-row align-items-center" href="/trust" target="_blank"><img alt="a small checkmark" src="/images/icon-checkmark-fleet-black-75-9x7@2x.png">SOC2 Type 2 certified</a>
|
||||
</div>
|
||||
<div class="text-sm-nowrap d-block d-sm-inline">
|
||||
© <%= (new Date()).getFullYear() %> <a href="/handbook">Fleet Device Management Inc.</a>
|
||||
© <%= (new Date()).getFullYear() %> <a href="/handbook"><%= corporationDisplayName %></a>
|
||||
<span purpose="legal-links">
|
||||
<a href="/legal/privacy">Privacy</a>
|
||||
</span>
|
||||
|
|
@ -378,7 +384,7 @@
|
|||
<a purpose="footer-trust-link" class="d-flex flex-row align-items-center" href="/trust" target="_blank"><img alt="a small checkmark" style="width: 9px; height: auto; margin-right: 6px;" src="/images/icon-checkmark-fleet-black-75-9x7@2x.png">SOC2 Type 2 certified</a>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
© <%= (new Date()).getFullYear() %> Fleet Device Management Inc.
|
||||
© <%= (new Date()).getFullYear() %> <%= corporationDisplayName %>
|
||||
<a style="margin-left: 12px; font-size: 12px; text-underline-offset: 2.5px; text-decoration: underline; color: #515774" href="/legal/privacy">Privacy</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue