Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website: add swag request CTA to /device-management page #23370

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions website/api/controllers/view-device-management.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,16 @@ module.exports = {
return testimonialOrderForThisPage.indexOf(a.quoteAuthorName) - testimonialOrderForThisPage.indexOf(b.quoteAuthorName);
});

let showSwagForm = false;
// Due to shipping costs, we'll check the requesting user's cf-ipcountry to see if they're in the US, and their cf-iplongitude header to see if they're in the contiguous US.
if(this.req.get('cf-ipcountry') === 'US' && this.req.get('cf-iplongitude') > -125) {
showSwagForm = true;
}

// Respond with view.
return {
testimonialsForScrollableTweets,
showSwagForm,
};

}
Expand Down
14 changes: 13 additions & 1 deletion website/assets/js/pages/device-management.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,18 @@ parasails.registerPage('device-management-page', {
},
closeModal: function() {
this.modal = undefined;
}
},
clickSwagRequestCTA: function () {
if(typeof gtag !== 'undefined') {
gtag('event','fleet_website__swag_request');
}
if(typeof window.lintrk !== 'undefined') {
window.lintrk('track', { conversion_id: 18587105 });// eslint-disable-line camelcase
}
if(typeof analytics !== 'undefined'){
analytics.track('fleet_website__swag_request');
}
this.goto('https://kqphpqst851.typeform.com/to/ZfA3sOu0#from_page=device-managment');
},
}
});
2 changes: 1 addition & 1 deletion website/assets/js/pages/docs/basic-documentation.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ parasails.registerPage('basic-documentation', {
if(typeof analytics !== 'undefined'){
analytics.track('fleet_website__swag_request');
}
this.goto('https://kqphpqst851.typeform.com/to/ZfA3sOu0');
this.goto('https://kqphpqst851.typeform.com/to/ZfA3sOu0#from_page=docs');
},

clickCTA: function (slug) {
Expand Down
33 changes: 33 additions & 0 deletions website/assets/styles/pages/device-management.less
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,39 @@
padding-bottom: 16px;
margin-bottom: 0px;
}
[purpose='swag-request-button'] {
max-width: 380px;
cursor: pointer;
margin-top: 16px;
margin-bottom: 16px;
display: flex;
padding: 16px;
justify-content: center;
align-items: center;
gap: 16px;
align-self: stretch;
border-radius: 8px;
border: 1px solid #E2E4EA;
background: #F9FAFC;
img {
margin-right: 16px;
}
p {
color: var(--text-text-primary, #515774);
font-family: Inter;
font-size: 14px;
font-style: normal;
line-height: 21px;
}
span {
color: var(--Core-Fleet-Black, #192147);
font-family: Inter;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: 21px;
}
}

// Desktop features comparison table styles
[purpose='desktop-comparison-table'] {
Expand Down
11 changes: 10 additions & 1 deletion website/views/pages/device-management.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,16 @@
</div>
</div>
</div>

<div v-if="showSwagForm">
<a purpose="swag-request-button" class="d-flex align-items-center justify-content-center mx-auto" @click="clickSwagRequestCTA()">
<div class="d-flex flex-row align-items-center">
<img style="height: auto; width: 47px;" alt="A very nice Fleet branded shirt" src="/images/[email protected]">
<p class="mb-0"><strong class="mr-1">Request Fleet swag. </strong>
</p>
<span>It's free <img purpose="right-arrow" class="d-inline" style="height: 16px; width: auto; margin-bottom: 2px;" alt="right arrow" src="/images/[email protected]" /></span>
</div>
</a>
</div>
<div purpose="comparison-section">
<h2>Head-to-head with the big players</h2>
<p>Considering a move to Fleet as a cross-platform, open-source MDM alternative? See how we compare:</p>
Expand Down
Loading