How to Add Tracking Code to Websites
Tracking code is a small piece of code you will be placing on your site. The tracking code places a cookie on each person’s browser. A cookie is a small tracking beacon used to follow people’s actions while on your site.
The process of adding tracking code to your website will vary based on how your website is set up. If you are, like most companies, using a content management system (CMS) such as WordPress or Drupal, the addition of the tracking codes should be fairly easy.
If you don’t have a content-management system, you need your webmaster to assist you in this process. Adding the tracking code is a simple copy-and-paste operation. The trick is in knowing where to paste the code.
Cookies can be controversial, especially depending on the country you’re in. Many European countries have different laws regarding what you may or may not do with cookies. It is suggested you research this issue first before you use them.
Obtain your tracking code in your marketing automation tool.
Locate your global footer in your content management system.
For example the following shows the global footer in a WordPress website. If you don’t have a content management system, your webmaster needs to complete this step and the next step for you.
When you have found your tracking code and located your global footer, copy and paste your tracking code into the footer.
The following shows tracking code from the Pardot marketing automation system properly placed in the global footer of a content management system. Make sure to paste the code into every web property you own.
Most marketing automation tools let you customize your code to allow for specific parameters to be passed through to your solution.
For example, you can customize your code for scoring and segmenting directly on the page a person is on. You can code the page to increase a person’s score directly if she visits the page, or change her lead source after visiting your blog so that you know which deals your blog influenced.