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.

In most countries (including the USA), it is sufficient to place a note in the terms and conditions of your website stating that your website uses cookies and that by using your website, users agree to your terms of use. However, you should check with your local laws to be sure.

1

Obtain your tracking code in your marketing automation tool.

The code is a piece of JavaScript. Depending on your tool, this piece of code may be short or long; the code varies from one tool to another.

2

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.

3

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.

  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
Advertisement

Inside Dummies.com