Skip to main content

Installing the Leadfeeder tracking script on a WordPress website

Install the Leadfeeder tracking script on WordPress with our plugin, Google Tag Manager, or a header plugin.

Written by Ruthie Keith

Install the Leadfeeder tracking script on your WordPress site using one of the three options below.

Before you start: You need the Super Admin or Administrator role in WordPress.

If the script doesn't show up on your site, clear your WordPress cache. WPBeginner's guide explains how.

The video below shows each step, and the written steps follow.

Option 1: Use the official WordPress plugin

The official "Web Visitors by Leadfeeder" plugin is the fastest way to install the tracking script. Get the plugin from WordPress.org.

  1. In WordPress, go to Plugins > Add New.
    ​

  2. Search for "Web Visitors by Leadfeeder".
    ​

  3. Find the plugin in the results and click Install Now.
    ​

  4. Activate the plugin using one of the options shown below.
    ​

  5. Click Web Visitors by Leadfeeder in the sidebar and paste your Website Tracker ID.
    ​

    If you've just signed up, find the Website Tracker ID on the Install the Leadfeeder script page. Otherwise, go to Settings (gear icon, bottom left) > Company > Website Tracker > Tracker script.
    ​

  6. Save your changes in WordPress.

If the tracking script still isn't working, add your website to the traffic filtering rules in Settings > Account.

Option 2: Install the tracking script using Google Tag Manager

If Google Tag Manager is already on your site, follow Installing the Leadfeeder tracking script using Google Tag Manager.
​

Option 3: Add the tracking script with a header plugin or child theme

If you aren't familiar with WordPress themes, ask someone on your team or use option 1 or 2. A mistake in a theme file can break your site.

Don't paste the tracking script into your main theme's header.php file. A theme update can overwrite it. Use one of these instead:
​

A. Use a header and footer plugin (recommended)

Plugins like WPCode or Insert Headers and Footers add scripts to your site's <head> section without touching theme files.

  1. Install and activate the plugin of your choice.

  2. Paste your tracking script into the header section.

  3. Save and publish.

B. Use a child theme

A child theme keeps your changes when the main theme updates. To use one:

  1. Go to Appearance > Theme File Editor in your WordPress dashboard.
    ​

  2. Select your child theme and open the header.php file.
    ​

  3. Paste your tracking script just before the closing </head> tag.
    ​

    Copy the script with the Copy script button in Company > Website Tracker > Tracker script, so it matches exactly.
    ​

  4. Click Update File in WordPress.

New companies appear in Web Visitors within an hour of your first visits.
​
To check the setup, see How to check the tracking script is working.


--

Questions, comments or feedback? Contact our support team via chat or email us at support@leadfeeder.com.

Did this answer your question?