Have you learnt how to set up Automation with LeadSquared? Become a pro now! X

Implementing LeadSquared Tracking via Google Tag Manager

Setting up Leadsquared tracking using Google Tag Manager is easy and we can get you started in just a couple of minutes!

(Google Tag Manager (GTM) is a free application that allows users to add code snippets to their website/mobile application without having to directly access their codebase every time. GTM provides a single script to be placed in the website – once installed, custom scripts can be added as “tags” within GTM, based on various “triggers” that you’ve identified).

Here’s how you can implement LeadSquared tracking script using Google Tag Manager:

1. Get Leadsquared tracking code

In your Leadsquared account, navigate to settings under the menu item “My Account”. Navigate to tracking script as Lead Tracking -> Tracking script. Copy the snippet of code available.

LeadSquared Tracking Script

Note: If you have already installed Leadsquared tracking script within your website, you’d have to remove it while implementing through GTM.

2. Set up the tags in GTM

Within GTM, follow the following process:

1. Sign in to your GTM account and select the relevant container from the Accounts tab. (If you haven’t yet set up your GTM Account: GTM Setup).

2. Add a new tag and select type as “Custom HTML” Tag. Let’s name the tag as “LSQ Tracking Script” and click continue.

3. Paste the copied code snippet from Leadsquared into the “HTML” field.

4. Open up Advanced Settings and set the “Tag firing priority” to any value, say 5. Tag firing priority ensures that a tag with higher value gets fired before tags of lower value.

After the above steps, your screen should look like this:

GTM

3. Set up triggers

Select ‘All Pages’ as the trigger. You want to ensure that the Leadsquared tracking script is on every page of your website.

All pages

4. Finish up

a) Click ‘Create Tag’ and select ‘Publish’ on the top right corner. GTM will now add the Leadsquared tracking script on your website.

b) Checking if tags are fired within GTM:

  • On the top right menu, under publish, select preview. Your GTM account is now in ‘Preview mode’

Preview mode

  • Open up your website on the same browser. The Tag manager debugger would open up and you can check if the tag you have just created has been fired.

Debugger

 

c) Checking if tracking script is installed in Leadsquared Application:

On using GTM, the tracking script page (Settings -> Lead tracking -> Tracking script) will say “Tracking Script has not been installed on the website.”, as the application doesn’t currently have the facility to check if it has been installed through GTM.

  1. Right click on your website and select Inspect element
  2. Select the ‘Console’ tab and type in MXCProspectId or pidTracker. If successfully installed, on clicking enter, no error would come up.

Note: This method will work depending upon the permissions provided by your website.

For further support, email us at support [at] leadsquared.com