Home
Lead Capturing & Tracking
How to Install LeadCenter JavaScript on WordPress
How to Install LeadCenter JavaScript on WordPress
This guide explains how to install your LeadCenter JavaScript on a WordPress website. The script powers external
form capture, modal pop-up forms, and visitor tracking. It should load on every page where you want LeadCenter to work.
Where to Get Your Script
Go to External Forms .
Click the Javascript Code button in the upper right.
Copy the snippet from the dialog.
The snippet is a small <script> block that loads two LeadCenter scripts. It is safe to include
site-wide.
Method 1 (Recommended): Install Site-Wide Using a Plugin
This is the safest method because it survives theme switches and theme updates.
Go to WordPress Dashboard → Plugins → Add New .
Search for and install WPCode or Insert Headers and Footers .
Activate the plugin.
Open the plugin's settings.
Paste the LeadCenter snippet into the Footer field (or Header — both work).
Save.
The script now loads on every page on your site.
Method 2: Add to the Theme Footer (Advanced)
Warning: If you change themes, this code is removed. Use Method 1 unless you know you'll never change themes.
Go to Appearance → Theme File Editor .
Open footer.php.
Find the closing </body> tag.
Paste the LeadCenter snippet directly above it.
Click Update File .
Method 3: Install on a Single Page Only
Edit the page where you want LeadCenter to be active.
Add a Custom HTML block at the bottom of the page.
Paste the LeadCenter snippet inside the block.
Update the page.
The script will load only on that page.
Verify Installation
Open your website in a browser.
Open Developer Tools → Network and reload the page.
Look for the LeadCenter script being requested.
Open Developer Tools → Console and confirm there are no LeadCenter errors.
Best Practices
Use a plugin (Method 1). Theme switches won't break your tracking.
Install in the footer. Footer placement does not slow page rendering.
Clear all caches after installing the script — browser, CDN, hosting cache, and any caching plugin.
Test in incognito after installing to bypass your normal browser cache.
Add your domain in LeadCenter on the External Forms page so submissions are accepted.
Troubleshooting
Script not loading? Confirm the plugin is active and the snippet is present in the page source. Clear caches.
Security plugin blocking? Allowlist node.leadcenter.ai in your security/firewall plugin.
Caching plugin keeping the old page? Purge all caches after install.
Forms not capturing? See Troubleshooting: Why Isn't My Form Capturing Leads?
FAQs
Do I need to install the script on every page?
For full coverage (modal pop-ups, external form capture, visitor tracking), yes — install site-wide using Method 1.
Will the script slow down my site?
The script is loaded asynchronously and is small. There is no perceptible impact on page rendering.
What if my page builder strips scripts from posts?
Use the plugin (Method 1) instead of the in-post Custom HTML block.
Can I use a Google Tag Manager container instead?
Yes. Add the snippet as a Custom HTML tag in GTM, set it to fire on All Pages, and publish.
Related Articles