Website: Update personalization on endpoint ops page. (#18502)

Closes: https://github.com/fleetdm/confidential/issues/6255

Changes:
- Updated view-endpoint-ops to sort and exclude quotes based on a user's
`primaryBuyingSituation`.
- Updated the quote by Brendan Shaklovitz in testimonials.yml
- Updated the endpoint ops page to hide/show videos based on a user's
`primaryBuyingSituation`
-
This commit is contained in:
Eric 2024-04-24 17:47:35 -05:00 committed by GitHub
parent 17d40562b7
commit 78fbcb8f28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 26 additions and 10 deletions

View file

@ -71,7 +71,7 @@
quoteAuthorJobTitle: Staff CPE at Stripe
productCategories: [Endpoint operations, Device management]
-
quote: Fleets come a long way - to now being the top open-source osquery manager. Just in the past 6 months.
quote: Fleets come a long way - to now being the top open-source osquery manager.
quoteImageFilename: social-proof-logo-atlassian-192x32@2x.png
quoteLinkUrl: https://www.linkedin.com/in/bshak/
quoteAuthorName: Brendan Shaklovitz

View file

@ -23,13 +23,19 @@ module.exports = {
// Get testimonials for the <scrolalble-tweets> component.
let testimonialsForScrollableTweets = _.clone(sails.config.builtStaticContent.testimonials);
// Filter the testimonials by product category
testimonialsForScrollableTweets = _.filter(testimonialsForScrollableTweets, (testimonial)=>{
return _.contains(testimonial.productCategories, 'Endpoint operations');
});
// Specify an order for the testimonials on this page using the last names of quote authors
let testimonialOrderForThisPage = ['Charles Zaffery','Dan Grzelak','Nico Waisman','Tom Larkin','Austin Anderson','Erik Gomez','Nick Fohs','Brendan Shaklovitz','Mike Arpaia','Andre Shields','Dhruv Majumdar','Ahmed Elshaer','Abubakar Yousafzai','Harrison Ravazzolo','Wes Whetstone','Kenny Botelho', 'Chandra Majumdar'];
let testimonialOrderForThisPage = ['Charles Zaffery','Dan Grzelak','Nico Waisman','Tom Larkin','Austin Anderson','Erik Gomez','Nick Fohs','Brendan Shaklovitz','Mike Arpaia','Andre Shields','Dhruv Majumdar','Ahmed Elshaer','Abubakar Yousafzai','Harrison Ravazzolo','Wes Whetstone','Kenny Botelho', 'Chandra Majumdar','Eric Tan'];
if(this.req.session.primaryBuyingSituation === 'eo-it'){
testimonialOrderForThisPage = ['Eric Tan', 'Tom Larkin', 'Nick Fohs', 'Harrison Ravazzolo', 'Wes Whetstone', 'Chandra Majumdar', 'Erik Gomez', 'Mike Arpaia', 'Kenny Botelho'];
} else if(this.req.session.primaryBuyingSituation === 'eo-security'){
testimonialOrderForThisPage = ['Nico Waisman','Charles Zaffery','Abubakar Yousafzai','Eric Tan','Mike Arpaia','Chandra Majumdar','Ahmed Elshaer','Brendan Shaklovitz','Austin Anderson','Dan Grzelak','Dhruv Majumdar'];
}
// Filter the testimonials by product category and the filtered list we built above.
testimonialsForScrollableTweets = _.filter(testimonialsForScrollableTweets, (testimonial)=>{
return _.contains(testimonial.productCategories, 'Endpoint operations') && _.contains(testimonialOrderForThisPage, testimonial.quoteAuthorName);
});
testimonialsForScrollableTweets.sort((a, b)=>{
if(testimonialOrderForThisPage.indexOf(a.quoteAuthorName) === -1){
return 1;

View file

@ -242,14 +242,14 @@
&:hover {
box-shadow: 0px 4px 16px 0px #E2E4EA;
}
&:first-of-type {
&.austin-anderson {
background: url('/images/video-testimonial-thumbnail-austin-anderson-223x168@2x.jpg');
background-position: center;
background-size: cover;
margin-right: 12px;
margin-left: 0px;
}
&:last-of-type {
&.nick-fohs {
background: url('/images/video-testimonial-thumbnail-nick-fohs-223x168@2x.png');
background-position: center;
background-size: cover;

View file

@ -71,12 +71,22 @@
</div>
<% } %>
<div purpose="testimonial-videos" class="d-flex">
<div purpose="testimonial-video" @click="clickOpenVideoModal('austin-anderson')">
<%if(primaryBuyingSituation === 'eo-security'){%>
<div purpose="testimonial-video" class="austin-anderson mx-auto" @click="clickOpenVideoModal('austin-anderson')">
<span><img src="/images/icon-play-video-8x9@2x.png" alt="Play">Play video</span>
</div>
<div purpose="testimonial-video" @click="clickOpenVideoModal('nick-fohs')">
<%} else if(primaryBuyingSituation === 'eo-it') {%>
<div purpose="testimonial-video" class="nick-fohs mx-auto" @click="clickOpenVideoModal('nick-fohs')">
<span><img src="/images/icon-play-video-8x9@2x.png" alt="Play">Play video</span>
</div>
<% } else { %>
<div purpose="testimonial-video" class="austin-anderson" @click="clickOpenVideoModal('austin-anderson')">
<span><img src="/images/icon-play-video-8x9@2x.png" alt="Play">Play video</span>
</div>
<div purpose="testimonial-video" class="nick-fohs" @click="clickOpenVideoModal('nick-fohs')">
<span><img src="/images/icon-play-video-8x9@2x.png" alt="Play">Play video</span>
</div>
<% } %>
</div>
</div>
<logo-carousel></logo-carousel>