Lead Gen & CRM's website tracking is made possible through tracking code. This allows you to connect with the Lead Gen & CRM platform and take advantage of all the tools Lead Gen & CRM has to offer.
This article will detail how to utilize tracking codes in Lead Gen & CRM.
Article Contents
Trial | ✓ | |
Essential | ✓ | |
Advanced | ✓ | |
Ultimate | ✓ |
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.
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. Lead Gen & CRM site tracking code also contains Perfect Audience code, and it will not need to be modified for use with Perfect Audience.
To add your website to Lead Gen & CRM, do the following:
- Click Settings in the left toolbar.
- Click Sites, located under Tracking in the left panel.
- Click
Options > Add Site.
Click to enlarge.
- Enter a short name for your website in the Short Site Name text field.
- 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
- 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. - Optionally, click the Make Available in Landing Page Builder checkbox.
- Click Add Site.
Important: Each unique domain will need to 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:
- Click Settings in the left toolbar.
- Click Sites, located under Tracking in the left panel.
- Locate the desired tracked website and click Deactivate.
Deactivated sites are not deleted and 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:
- Click Settings in the left toolbar.
- Click Sites, located under Tracking in the left panel.
- Click the Active drop-down menu and select Inactive Sites.
- Locate the desired tracked website and click Activate.
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:
- Click Settings in the left toolbar.
- Click Sites, located under Tracking in the left panel.
- Click the name of a tracked website.
- Click the Tracking Code tab.
- Copy the the tracking code.
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 tracking code on a website, do the following:
- In another browser tab, open your website.
- Log in as an administrator.
- Open the page's code settings.
- Paste the copied tracking code immediately before the closing
</head>
tag. - Repeat as necessary for every page or template on your site.
- 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:
- In a different browser tab, log in to Wordpress.
- Click Editor, located under Appearance in the left panel.
- Click the header.php file, located in the right menu.
- Paste your copied tracking code immediately before the closing
</head>
tag. - 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.
- Add tracking code to your website.
- 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.