In website analytics, a tracking code is a snippet of JavaScript code that tracks the activity of a website user by collecting data and sending it to the analytics module. The code is generated automatically, is different for each website, and has to be installed on each page you want to track.

You can use tracking codes not only for specific website pages, but also for social media platforms (in this case they’re referred to as pixels), and for tracking the source, medium or campaign via a custom URL. In the latter situation, you have to use a UTM tracking code; by implementing this code, you’ll be able to see in Analytics where your website traffic and searches came from.