Common Platforms
WordPress
Install VisitorLead on WordPress via the WPCode plugin.
The simplest path on WordPress is the free WPCode plugin (formerly Insert Headers and Footers) — 3M+ active installs and a one-field header snippet box.
Steps (WPCode plugin)
-
In WP Admin, go to Plugins → Add New and search for WPCode.
-
Install and activate WPCode — Insert Headers and Footers + Custom Code Snippets.
-
Code Snippets → Header & Footer.
-
In the Header box, paste:
<script id="visitorleadjs" async src="https://ingest.visitorlead.tech/vl.js" data-code="YOUR_SITE_CODE"></script> -
Save Changes at the bottom of the page.
Alternative — child theme header.php
If you don't want a plugin and use a child theme, add this to your child theme's functions.php:
add_action('wp_head', function () {
echo '<script id="visitorleadjs" async src="https://ingest.visitorlead.tech/vl.js" data-code="YOUR_SITE_CODE"></script>';
});Don't edit the parent theme directly — your changes will be lost on theme updates.
Official references
- WordPress:
wp_headhook reference — developer.wordpress.org - WPCode plugin — wordpress.org plugin directory