How to trigger custom code on the "webinar started" event
In this article, you will learn how to use the "webinar started" event. It helps you to run your custom code when the webinar starts.
You will need:
- a systeme.io account
- a webinar funnel
Open the page editor of the webinar broadcast page
Click the "
Settings" button.
Click "
Edit header code" or "
Edit footer code".
In the popup window that appears. insert your code inside the `addEventListener`, using the code template below:
<script> document.addEventListener('start_webinar', function () { // insert your code here console.log('the webinar started') }) </script>
Click the "
Save" button to save the code.
You can check if everything works right using the preview mode — click the preview button to be redirected to the preview page.
The code inside `addEventListener` will be triggered when the countdown is finished.
After confirming that the trigger works properly, return to the page editor and save the page by clicking the "
Save changes".