hero.schedule('#form-id'), which listens for your formâs submit event and opens the scheduler automatically. But that doesnât always fit. Maybe youâre running server-side validation before showing the calendar. Maybe your form lives inside an iframe. Maybe youâre building in React and thereâs no traditional form submit event to listen to.
This article covers every way to invoke the RevenueHero scheduler on your website. For the step-by-step router setup that generates your script snippet, see Create Inbound Router.
BEFORE YOU BEGIN
- Create an Inbound Router and note your Router ID
- Add the RevenueHero source script to the
<head>of your page:
Methods
The RevenueHero script exposes three methods. The first,hero.schedule(), is the standard method documented in every web forms integration guide. The other two, hero.submit() and hero.dialog.open(), give you programmatic control over the entire flow.
hero.schedule(formSelector)
Binds to a formâs native submit event. When the form is submitted, RevenueHero intercepts the data, runs routing rules, and opens the scheduler automatically.e.preventDefault() on the formâs submit event before RevenueHero can listen to it, hero.schedule() will never fire. Use hero.submit() instead.
hero.submit(formData)
Sends form field data directly to RevenueHero for routing and qualification. Returns a Promise that resolves with session data you can use to open the scheduler.hero.schedule() doesnât work.
hero.dialog.open(sessionData)
Opens the scheduler popup programmatically. Takes the session data returned fromhero.submit().
hero.submit(). This is what actually makes the calendar visible to your prospect.
Constructor options
TheRevenueHero constructor accepts a configuration object:
Custom validation before scheduling
The most common reason to usehero.submit() is when you need to validate form data before showing the scheduler. Run your validation, and only trigger RevenueHero if it passes.
Webflow forms (AJAX intercept)
Webflow forms submit via AJAX by default. If the standardhero.schedule() doesnât trigger the scheduler on your Webflow site, use this jQuery-based intercept pattern:
#wf-form-Email-Form with your Webflow formâs CSS ID and 'xxx' with your Router ID.
For the standard Webflow installation that works without this intercept, see Webflow Forms.
React and Next.js
In single-page applications, the RevenueHero script needs to load dynamically since thereâs no traditional page load.React
Next.js
Use the Next.jsScript component to load the RevenueHero script:
Gatsby
Gatsby uses the<Script> component from gatsby-script:
Google Tag Manager
You can load the RevenueHero script through GTM instead of adding it directly to your page HTML.Loading the script via GTM
- In Google Tag Manager, create a new Custom HTML tag
- Add the script:
- Set the trigger to DOM Ready on the pages where your form exists
- Publish the container
Tracking conversions with GTM
Use RevenueHeroâs JavaScript Events to push conversion data into the GTM data layer:PAGE_LOADED event is particularly useful for Google Ads conversion tracking. It fires when the scheduler with booking slots is displayed, which means the lead passed your routing qualification. Use this as a âQualified Leadâ conversion action.
Global script across multiple pages
If you use the same form structure across many pages (e.g., the same HubSpot form on 400+ landing pages), you can install one script at the template level. Add the RevenueHero script to your siteâs global template or theme footer. The script will look for the specified form selector on every page. If the form isnât present on a particular page, the script does nothing.Re-trigger the scheduler (booking incomplete page)
If a prospect fills your form but doesnât book a meeting, you can create a âBooking Incompleteâ page that lets them try again. Store the form data inlocalStorage after the initial submission, then use hero.submit() on the retry page.
On your original form page
On the âbooking incompleteâ page
Check your installation
After you add the script to your page, check that it works before prospects find out it doesnât. Verify now loads the page you give it and tests the three things a booking depends on.- In the left sidebar, click Inbound â Routers and open your router.
- Open Widget Installation and stay on the Website tab.
- Under Check your installation, click Verify now.

- Enter the webpage where youâve set up the scheduler, then click Start verification.

Each issue is listed as an error or a warning, with an explanation and the fix. Where the fix is a new snippet, Copy snippet gives you the right one.

After you make a fix, click Check again to rerun the test. Run it again whenever the page changes.
Troubleshooting
Scheduler doesnât appear after form submit
Check the form selector. The CSS selector passed tohero.schedule() must match your form element exactly. Open your browserâs developer console and run document.querySelector('#your-form-id') to verify the form element exists.
Check for e.preventDefault(). If your JavaScript calls e.preventDefault() on the formâs submit event before RevenueHeroâs listener fires, the scheduler wonât trigger. Switch to hero.submit() + hero.dialog.open().
Check the browser console. Look for errors from scheduler.min.js. A 500 error from the RevenueHero API usually means a field mapping mismatch. Verify that the field names in your form match the mappings in your Inbound Router.
Script not loading
Donât defer the script. Addingdefer or async attributes to the scheduler.min.js script tag can cause it to load after your formâs submit handler runs. Load it synchronously in the <head> section.
scheduler.min.js from defer, delay, and minification settings.
Form inside an iframe
If your form renders inside an iframe (common with Pardot embedded forms), the parent pageâs RevenueHero script cannot access the formâs submit event due to cross-origin restrictions. Solutions:- Use the Pardot integration which handles this natively with
formType: 'pardot' - Add the RevenueHero script inside the iframeâs HTML (in the formâs âBelow Formâ or âThank Youâ content area)
- If neither works, contact support. The team can build a custom script for your form handler setup.
PHP or CMS wrapping the script in HTML tags
Some CMS platforms (WordPress visual editors, PHP templates) may wrap your<script> tag in <p> or <div> tags, which breaks execution. Use your CMSâs raw HTML or code block to prevent this.
Your advanced script installation is configured. Once youâve added the script to your page, submit a test form entry and check your Routing Logs to confirm submissions are flowing through. đđđ
JavaScript Events
Listen for MEETING_BOOKED, PAGE_LOADED, and other events from the scheduler widget.
Create Inbound Router
Set up routing rules and get your Router ID.
Mapping Your Form
Map your form fields so RevenueHero can use them in routing conditions.
Custom HTML Forms
Standard script installation for custom HTML forms.