1. Feature Overview
Google Tag Manager (GTM) is a free application that allows you to add code snippets to your website/mobile application without having to directly access their codebase every time. GTM provides a single script to be placed in your website – once installed, custom scripts can be added as “tags” within GTM, based on various “triggers” that you’ve identified. You can use Google Tag Manager to set up tracking on your LeadSquared website.
2. Get LeadSquared Tracking Code
To get your LeadSquared website’s tracking code –
- From your main menu, navigate to My Profile>Settings>Lead Tracking>Tracking Script.
- Copy the code snippet that’s listed on this page.
3. Set Up the Tags in GTM
Within GTM, follow the following steps –
- 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, please refer to GTM Setup.
- Add a new tag and select type as Custom HTML Tag. Name the tag as “LSQ Tracking Script” and click Continue.
- Paste the copied code snippet from LeadSquared into the HTML field.
- Open up Advanced Settings and set the Tag firing priority to any value (for eg, 5). Tag firing priority ensures that a tag with higher value gets fired before tags of lower value.
After you complete the above steps, your screen should look like this –
4. Set Up Triggers
Select All Pages as the trigger. This is to ensure that the LeadSquared tracking script is present on every page of your website.
5. Finishing Up
- Click Create Tag and select Publish on the top right corner. GTM will now add the LeadSquared tracking script to your website.
- Check if the tags are fired within GTM. On the top-right menu, under Publish, select Preview. Your GTM account is now in 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 have been fired.
iii. Checking if the tracking script is installed in LeadSquared. On using GTM, the Tracking Script page will show the message, “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. To resolve this –
- Right click on your website and select Inspect element.
- Select the Console tab and type in MXCProspectId or pidTracker. If successfully installed, on clicking enter, no error would come up.
Did you find this article helpful? Please let us know any feedback you may have in the comments section below. We’d love to hear from you and help you out!