SharpSpring's website tracking is made possible through tracking code. This allows you to connect with the SharpSpring platform and take advantage of all the tools SharpSpring has to offer. This article will detail how to utilize tracking codes in SharpSpring.
|
Available with: | ||||
Marketing Automation | ✓ | ||||
CRM Ultimate | ✓ | ||||
CRM PRO | ✓ | ||||
CRM Free | ✓ | ||||
Toolbar: | |||||
![]() ![]() |
|||||
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. SharpSpring utilizes its own tracking and analytics services, and it provides ways to utilize Google Analytics.
Tracking codes are generated automatically. That said, tracking codes are different for each website. This means that tracking codes must be installed on each page you want to track. |
Important: Tracking codes should be placed directly on pages in your website. Google Tag Manager does not currently work with SharpSpring tracking code.
|
Tracking in SharpSpring is cookie-based. For information on cookies and how SharpSpring uses cookies for tracking, refer to Understanding Cookies.
Adding Websites
To begin tracking your website in SharpSpring, you will first need to add it to SharpSpring and generate a tracking code. To add your website to SharpSpring, do the following:
|
||
Important: Each unique domain will need to have a unique tracking code.
|
||
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.
|
||
Deactivating Websites
You can deactivate website tracking at any time. To deactivate and disable tracking for a website, do the following:
|
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:
|
Reactivated websites will be placed in the Active Sites list.
Copying Tracking Codes
Once you have added a website to SharpSpring, 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 SharpSpring, do the following:
|
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:
|
Note: SharpSpring 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:
|
For more information on tracking Wordpress sites, refer to Adding Tracking Codes to Wordpress.
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: SharpSpring 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.