SEO glossary · T

Tracking Code

What is a Tracking Code?

A tracking code is a small piece of JavaScript added to a website that sends data about visits and actions to an analytics or advertising platform. Examples are the Google tag for Google Analytics and Google Ads, the Meta Pixel and the LinkedIn Insight Tag.

What tracking codes do

  • Record page views, clicks, scrolling, form submissions and purchases as events.
  • Tell ad platforms which clicks led to conversions, so they can report results and optimize bidding.
  • Build audiences for remarketing.

How to add them

  • Google Tag Manager: one container on the site that loads and manages all your tags, without editing the code for every change.
  • Directly in the site’s code: usually in the <head>, as each platform’s instructions describe.
  • Plugins or built-in integrations in your CMS or shop platform.

Good practice

  • Only load tracking codes after visitors consent where the law requires it, for example with a consent banner and Google Consent Mode in the EU and UK.
  • Test with Tag Assistant and each platform’s debugging tools after every change.
  • Remove codes for tools you no longer use; each one slows the site down.
  • Don’t send personal data, such as email addresses, in page URLs or events.

“Tracking code” can also mean a UTM code: parameters added to a link to show which campaign a visitor came from.

Get in touch

Know the term. Now rank for it.

Tell us the search you want to win. A specialist reads it and replies by email, and if it helps, we set up a short call.

    A specialist reads your message and replies by email.