Owner of A.E. Coaching. Specializes in business performance coaching. His individualized coaching unlocks growth by providing strategies, mindset, accountability and motivation. Coach Luke inspires you to accelerate success and make an impact.
```javascript
// Find the back button element
const backButton = document.querySelector('.back-button');
// Add a click event listener to the back button
backButton.addEventListener('click', () => {
// Check if the referrer URL is from the same domain
if (
document.referrer.includes(window.location.hostname)
) {
// If the referrer URL is from the same domain, go back to the previous page
window.history.back();
} else {
// If the referrer URL is from a different domain, redirect to a default page
window.location.href = 'https://www.appreciationfinancialevents.com/annual-convention';
}
});
```