diff --git a/website/api/controllers/view-homepage-or-redirect.js b/website/api/controllers/view-homepage-or-redirect.js index 9d911ee32e..4db3a40640 100644 --- a/website/api/controllers/view-homepage-or-redirect.js +++ b/website/api/controllers/view-homepage-or-redirect.js @@ -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 {}; } diff --git a/website/api/hooks/custom/index.js b/website/api/hooks/custom/index.js index b45383661c..23d6c3bb2a 100644 --- a/website/api/hooks/custom/index.js +++ b/website/api/hooks/custom/index.js @@ -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(); diff --git a/website/config/routes.js b/website/config/routes.js index 30ef74d23e..a286fc1d1a 100644 --- a/website/config/routes.js +++ b/website/config/routes.js @@ -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)' } }, diff --git a/website/views/layouts/layout.ejs b/website/views/layouts/layout.ejs index 6c0f355862..12cf45468c 100644 --- a/website/views/layouts/layout.ejs +++ b/website/views/layouts/layout.ejs @@ -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 %> - <%= typeof pageTitleForMeta !== 'undefined' ? pageTitleForMeta : 'Fleet | Open-source device management' %> - + <%= typeof pageTitleForMeta !== 'undefined' ? pageTitleForMeta : defaultMetaTitle %> + <% /* Viewport tag for sensible mobile support */ %> <%// Twitter meta tags%> - - + + <%// Meta tags for other social previews %> - - + + <% /* 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 small checkmarkSOC2 Type 2 certified
- © <%= (new Date()).getFullYear() %> Fleet Device Management Inc. + © <%= (new Date()).getFullYear() %> <%= corporationDisplayName %> Privacy @@ -378,7 +384,7 @@ a small checkmarkSOC2 Type 2 certified
- © <%= (new Date()).getFullYear() %> Fleet Device Management Inc. + © <%= (new Date()).getFullYear() %> <%= corporationDisplayName %> Privacy