Amplify Engage Homepage Popup

There is a built-in delay to make sure that it functions on the homepage.
You will need to:
- Create a new content page with the embedded engage HTML (code is on DreamStream)
- Add the Sitewide Script into Preferences>Advanced.
Be sure to update the colors to match your site currenty red and white
//amplify engage popup for homepage
<script>
setTimeout(() => {
if (window.location.pathname !== "/" || document.getElementById("amplify-sticky-signup")) return;
const sticky = document.createElement("a");
sticky.id = "amplify-sticky-signup";
sticky.href = "https://www.eldoradocountyfire.com/join-our-mailing-list";
sticky.textContent = "Join our mailing list";
sticky.setAttribute("aria-label", "Join our mailing list");
sticky.setAttribute("role", "button");
Object.assign(sticky.style, {
position: "fixed",
bottom: "20px",
right: "20px",
backgroundColor: "#BA261A",
color: "#ffffff",
padding: "12px 20px",
borderRadius: "6px",
fontWeight: "bold",
fontSize: "14px",
fontFamily: "inherit",
textAlign: "center",
whiteSpace: "nowrap",
textDecoration: "none",
boxShadow: "0 4px 12px rgba(0,0,0,0.3)",
cursor: "pointer",
zIndex: "2147483647"
});
sticky.addEventListener("mouseenter", () => {
sticky.style.backgroundColor = "#b30000";
});
sticky.addEventListener("mouseleave", () => {
sticky.style.backgroundColor = "#BA261A";
});
document.body.appendChild(sticky);
console.log("✅ Sticky button added on homepage only.");
}, 7000);
</script>