When you embed your events on an external website using an iframe, clicking "View Details" or "Register" navigates within the iframe. By default, the parent page may not scroll to the top of the iframe, leaving visitors looking at the middle or bottom of the detail page.
This article explains how to ensure the page scrolls to the top of the iframe automatically whenever visitors navigate between event pages.
If you copy the embed code from Marketing → Events → Public Link, the iframe snippet now automatically includes a companion script that handles scroll-to-top behavior. Simply re-copy the embed code and replace the old one on your website.
The updated embed code looks like this:
<iframe src="https://events.leadcenter.ai/events/YOUR_ID/list" width="900" height="600" style="border: none;"></iframe>
<script src="https://events.leadcenter.ai/js/lc-events-embed.js"></script>
If you already have the old iframe code on your website and don\'t want to replace it, simply add this single line anywhere on the same page (in the header, footer, or right after the iframe):
<script src="https://events.leadcenter.ai/js/lc-events-embed.js"></script>
No changes to your existing iframe tag are needed. The script automatically detects which iframe sent the scroll request and scrolls the page to the top of that iframe.
lc-events-embed.js script listens for that message and smoothly scrolls the page so the top of the iframe is visible.https://events.leadcenter.ai/js/lc-events-embed.js<script> tag. Some builders require adding scripts through a dedicated "Custom HTML" or "Code Injection" section.In WordPress, you can add the script tag via:
<script src="..."> line in your theme\'s footer scripts section. This way it loads on every page automatically.
If you can’t find the answers you’re looking for, our support specialists are available to answer your questions and troubleshoot if necessary.