< View all articles in Lead Tracking.

How to deploy Visitor Tracking Script on your website?

This Help Article deploy Visitor Tracking Script on your website. LeadSquared tracking script needs to be deployed properly to make the whole LeadSquared system work. It tracks when your leads visit your website and which pages do they visit. It keeps track of new visitors till they are identified as Leads.


  • You have access to your website’s HTML to perform this task. You can Email this script to your webmaster or your IT Administrator if you do not the administer of your website.
  • You should be logged into your LeadSquared system.


The procedure to deploy the visitor tracking script varies from a website hosted on WordPress platform and a NonWordPress platform. For detailed procedure on deploying visitor tracking script, refer to:

  • Non-Wordpress platform
  • WordPress platform

Deploy visitor tracking script on a website which is not hosted on a WordPress Platform

To get the Website Tracking Script, go to My Account -> Settings -> Website Tracking Script.

You can find the website tracking script for tracking on a secured site as well as a non-secured site. Examplehttp://www.google.com is a non-secured site and https://www.gmail.com is a secured site.

You can alternatively have the tracking script Emailed to any Email id by clicking on the Mail To button. This is mainly intended to allow you to send the tracking script to your IT administrator.

Copy this script and paste it before the </body> tag of your website on each page. The best practice to do this is to include it in a file that is common to all web pages in your website.  Typically this is your footer component of your website. This ensure that the script appears on all the pages. LeadSquared does not track Lead visits on pages where the script is not installed. Make sure the code is pasted as is in your website. Do Not make any changes to it.

Paste Before Body Tag

Example: This procedure will show you how to add the tracking script in a Joomla hosted website.

  • Log on to your Joomla website as an administrator. Go to Extensions -> Template Manager.
  • Select the template which is marked as default () or select the template which you are using, and click Edit (Edit Main Page Template, in case of Joomla 2.0 and above). In the template edit page click Edit HTML.


  • Scroll to the bottom of the code and look for the </body> tag. Paste the LeadSquared tracking script above the tag, and click Save.


  • After the installation of the tracking script is completed, you can verify the same in LeadSquared. Go to My Account -> Settings -> Website Tracking Script.  If you have installed correctly, success message appears on the screen.


Note: If Google Tag Manager is used to deploy LeadSquared Tracking Script on your website, LeadSquared Application as of now would not recognize the tracking script. However, the tracking will be fully functional without any issue.

In such a case kindly ignore the notification that states “Tracking Script has not been installed on the website.”

Please write to support@leadsquared.com in case of any queries.