Skip to content

Commit bdafd5a

Browse files
authored
fix: add plausible event tracking for "Request Demo" link and update newsletter endpoint formatting (#243) (#244)
1 parent 1102158 commit bdafd5a

File tree

2 files changed

+26
-17
lines changed

2 files changed

+26
-17
lines changed

overrides/partials/footer.html

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@
183183
// Configuration
184184
const NEWSLETTER_CONFIG = window.NEWSLETTER_CONFIG || {
185185
RECAPTCHA_SITE_KEY: "6LdvUdMrAAAAAJksqV0YEwNBEBGL2SB90Gebun5n",
186-
NEWSLETTER_ENDPOINT: "https://5cciazu22tev222enhrbx6w3y40hscvu.lambda-url.us-east-2.on.aws",
186+
NEWSLETTER_ENDPOINT:
187+
"https://5cciazu22tev222enhrbx6w3y40hscvu.lambda-url.us-east-2.on.aws",
187188
FALLBACK_ENDPOINT:
188189
"https://5cciazu22tev222enhrbx6w3y40hscvu.lambda-url.us-east-2.on.aws",
189190
};
@@ -1062,21 +1063,29 @@
10621063
footerData.forEach((section) => {
10631064
const column = document.createElement("div");
10641065
column.innerHTML = `
1065-
<div class="tw-text-white tw-font-medium tw-text-base tw-mb-3">${
1066-
section.title
1067-
}</div>
1068-
<ul class="tw-space-y-2 tw-text-gray-300 tw-text-xs header-list-style">
1069-
${section.items
1070-
.map(
1071-
(item) => `<li class="hover:tw-text-[#7782FF]">
1072-
<a href="${item.link}" target="${item.target || ""}">${
1073-
item.text
1074-
}</a>
1075-
</li>`
1076-
)
1077-
.join("")}
1078-
</ul>
1079-
`;
1066+
<div class="tw-text-white tw-font-medium tw-text-base tw-mb-3">
1067+
${section.title}
1068+
</div>
1069+
<ul class="tw-space-y-2 tw-text-gray-300 tw-text-xs header-list-style">
1070+
${section.items
1071+
.map((item) => {
1072+
const plausibleAttr =
1073+
item.text === "Request Demo"
1074+
? 'plausible-event-name="Demo+Button"'
1075+
: "";
1076+
return `
1077+
<li class="hover:tw-text-[#7782FF]">
1078+
<a href="${item.link}" target="${
1079+
item.target || ""
1080+
}" ${plausibleAttr}>
1081+
${item.text}
1082+
</a>
1083+
</li>
1084+
`;
1085+
})
1086+
.join("")}
1087+
</ul>
1088+
`;
10801089
container.appendChild(column);
10811090
});
10821091

overrides/partials/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
</nav>
153153
<div class="tw-flex tw-items-center tw-space-x-2">
154154
<a
155-
class="tw-flex tw-capitalize tw-text-nowrap tw-text-center tw-justify-center tw-items-center tw-px-3 md:tw-px-5 tw-py-1.5 tw-text-xs primary-button tw-transition-opacity tw-duration-500 tw-ease-in-out tw-opacity-100 tw-visible tw-pointer-events-auto"
155+
class="tw-flex tw-capitalize tw-text-nowrap tw-text-center tw-justify-center tw-items-center tw-px-3 md:tw-px-5 tw-py-1.5 tw-text-xs primary-button tw-transition-opacity tw-duration-500 tw-ease-in-out tw-opacity-100 tw-visible tw-pointer-events-auto plausible-event-name='Demo+Button'"
156156
href="/demo/"
157157
target="_self"
158158
>

0 commit comments

Comments
 (0)