Lead Gen & CRM
How can we help you?
Search our help articles, video tutorials, and quickstart guides

You've got this. You've got us. Search our Knowledge Base to quickly find answers to your questions.

Tracking Your Websites in Lead Gen & CRM

Article: 000050376
Updated: June 24, 2026

Website tracking is made possible through utilizing tracking codes. This allows you to connect with the Lead Gen & CRM platform and take advantage of all the tools it has to offer.

 
Users:
Administrators 
Company Managers  
Marketing Managers  
Sales Managers  
Salespersons  
Jr. Salespersons  


Understanding Tracking Codes

Tracking codes are Javascript code snippets. Once added to the HTML of a web page, these code snippets track, collect and send website user activity. This data is sent to a website analytics platform or service. Lead Gen & CRM utilizes its own tracking and analytics services, and it provides ways to utilize Google Analytics.

Tracking codes are generated by Lead Gen & CRM automatically and each code is different for each website. Tracking codes must be installed on the header of the website you want to track. Once you add the tracking code to your website header, that header (and therefore the tracking code) should appear on every webpage within your website. 

Once you have added the Lead Gen & CRM tracking code to a website, microsite, blog, or landing page, you will start generating leads within seconds. Lead Gen & CRM allows you to track as many sites as you would like and monitor them in one place.

Important: Tracking codes should be placed directly in the header of your websites. Google Tag Manager does not currently work with Lead Gen & CRM tracking codes.

Tracking in Lead Gen & CRM is cookie-based. Refer to Understanding Cookies for information on cookies and how Lead Gen & CRM uses cookies for tracking.



Adding Websites

To begin tracking your website in Lead Gen & CRM, you will first need to add it to Lead Gen & CRM and generate a tracking code.

When creating websites for use with Perfect Audience, you will not need to do anything special. The Lead Gen & CRM site tracking code also includes the Perfect Audience code, so it does not need to be modified for Perfect Audience.

To add your website to Lead Gen & CRM, do the following:

  1. Click Settings in the left toolbar.
  2. Click Sites, located under Tracking in the left panel.
  3. Click 12cog.png  Options > Add Site

    Add Site option in the Sites page dropdown menu in Settings 
  4. Enter a short name for your website in the Short Site Name text field.
  5. Select one of the following website types from the Site Type drop-down menu:
    • Main Site
    • Microsite or Brochure
    • Blog or Informative
    •  Help or Forum
    • Social
  6. Enter the domain name URL in the Domain Name/URL text field.
    Important: If a site with the same domain name already exists in your account, either activated or deactivated, the generated website will not save. You cannot have two sites with the same domain name.
  7. Optionally, click the Make Available in Landing Page Builder checkbox.
  8. Click Add Site.

    Add a website popup form with blue Add Site button 

Important: Each domain must have a unique tracking code. 



Deactivating Websites

You can deactivate website tracking at any time. To deactivate and disable tracking for a website, do the following:

  1. Click Settings in the left toolbar.
  2. Click Sites, located under Tracking in the left panel.
  3. Locate the desired tracked website and click Deactivate

    Deactivate button next to a landing page in the Sites section of Settings 

Deactivated sites are not deleted; they are placed in the Inactive Sites list. 



Reactivating Websites

You can reactivate tracking for previously deactivated websites. To reactivate a deactivated website, do the following:

 

  1. Click Settings in the left toolbar.
  2. Click Sites, located under Tracking in the left panel.
  3. Click the Active drop-down menu and select Inactive Sites

    Inactive Sites dropdown in the Sites section of Settings  
  4. Locate the desired tracked website and click Activate

    Blue Activate button in the Sites section 

Reactivated websites will be placed in the Active Sites list.



Copying Tracking Codes

Once you have added a website to Lead Gen & CRM, the website will be assigned a specific tracking code. This tracking code will need to be copied for use on your website. To copy a tracking code in Lead Gen & CRM, do the following:

  1. Click the name of a tracked website. 

    The name of the landing page in the Sites section 
  2. Click the Tracking Code tab.
  3. Copy the tracking code.

    The tracking code text box in the Tracking Code tab of the Site 

The tracking code will be located under the Domain and Tracking ID information.



Pasting Tracking Codes

Once you have added a site and copied that site's tracking code, you will need to paste the tracking code on your website. While each website is different, the general process is largely the same.

To paste the tracking code on a website, do the following:

  1. In another browser tab, open your website.
  2. Log in as an administrator.
  3. Open the page's code settings.
  4. Paste the copied tracking code immediately before the closing </head> tag.
  5. Repeat as necessary for every page or template on your site.
  6. Wait 24 hours.

Note: Constant Contact offers Professional Services to assist with custom coding. 

Once you have properly pasted your code and waited 24 hours, you should see site traffic for this site in your instance under the Site Traffic tab. The orange Pending tag will turn green and say Active once tracking is live.

 

Tracking WordPress Websites

WordPress is a popular content management system (CMS) that allows you to host web content. You can track WordPress websites. 

To place tracking code on a WordPress site, do the following:

  1. In a different browser tab, log in to WordPress.
  2. Click Editor, located under Appearance in the left panel.
  3. Click the header.php file, located in the right menu.
  4. Paste your copied tracking code immediately before the closing </head> tag.
  5. Click Update File. 

 

Refer to Adding Tracking Codes to WordPress for more information on tracking WordPress sites.



Adding Anchor Tag Code to Single-Page Websites

Certain websites require different tracking methods. A single-page application (SPA) is a web application or website that fits on a single webpage with the goal of providing a more fluid user experience akin to a desktop application.

In order to track events for single-page websites, your webpage must use URLs that use the hashtag appended to the URL. If you are looking to track events on a single page, your website must use anchor tags.

To add tracking code via anchor tags, do the following:

Note: Constant Contact offers Professional Services to assist with custom coding. 

  1. Add tracking code to your website.
  2. Paste the following code snippet below the tracking code:  
    <!-- TRACKING CODE GOES HERE -->
    
    <!-- Script Example of Catching URL hash changes -->
    <script type='text/javascript'>
        if ("onhashchange" in window) {
            window.onhashchange = function () {
                _ss.push(['_trackPageView']);
            }
        } else {
            var prevHash = window.location.hash;
            window.setInterval(function () {
                if (window.location.hash != prevHash) {
                    prevHash = window.location.hash;
                    _ss.push(['_trackPageView']);
                }
            }, 100);
        }
    </script>
    
    This will run _ss.push(['_trackPageView']) when the URL hash changes, tracking a new page view. 
 


Did this article answer your question?


Constant Contact Logo

Copyright © 2026 · All Rights Reserved · Constant Contact · Privacy Center