Your Contentsquare platform experience is empowered by our AI innovation. Practical insights, not hype.
Learn more
Guide

Website tracking guide: how it works and why to do it

[Guide] [Exit-intent survey] How to create - cover

Whether you’re a casual internet user or you work on a website or product, website tracking and product analytics are fundamental parts of your daily online life.

As an individual, you’re likely interested in protecting your privacy. As a marketer, or a UX or product person, tracking is what helps you optimize a site, fix bugs, improve UX, and achieve business growth. When done right (and we’ll show you how), website tracking can be beneficial to both users and businesses.

In this guide, we explore website tracking from both sides and cover what it is, how it works, and how to use a privacy-focused approach to tracking website activity.

A tracking platform that’s powerful, yet privacy-first

Contentsquare’s experience analytics tools help you truly understand your users’ behavior, without invading their privacy.

What is website tracking?

Website tracking (or web tracking) is a method of collecting, storing, and analyzing user activity across one or several web pages.

Most online businesses use some form of tracking, including

  • Traffic tracking to measure key web analytics data—for example, with platforms like Google Analytics and Contentsquare 

  • Experience tracking to measure user behavior and improve the user experience—for example, with session replays

  • Preference tracking to store individual site settings—for example, with shopping carts and login details

  • Advertising tracking to measure the performance of ad campaigns—for example, with Facebook ads

[Visual] Session replay - Triggered recording
Triggered recording

An example of experience tracking. Contentsquare’s Session Replay shows how users behave on a page: where they scroll, tap, click or even rage click. 

What website tracking measures

Website or product tracking helps you

The benefits of user tracking

When done right, website and user tracking can be beneficial to both individual users and businesses.

How tracking helps users

Website tracking technologies help you remember log-ins and preferences so you don’t need to start from scratch every time you visit a site. For example, if you add a bunch of items to your Amazon shopping cart but don’t check out, they’ll likely still be waiting for you a few days later.

Similarly, web tracking helps websites and products offer a more personalized experience, like tailoring content based on a visitor’s location or time zone:

[Visual] Moz - time zone greeting

The Moz login page offers a greeting personalized to a user’s timezone

Individual users can also benefit from improved UX if tracking is used to spot and fix bugs and create more enjoyable and useful product and site experiences.

How tracking helps businesses

Improving UX doesn’t just benefit customers: happy users are good for business, leading to improved metrics, like CTR (click-through rate), bounce rate, and conversion rate, and increased sign-ups and sales.

Website tracking also helps teams measure the performance of marketing campaigns, including SEO performance, so you can gain valuable insights to help with decision-making.

5 ways websites track user activity

When you visit a website or app, data is collected from your device and web browser and used to tailor your experience or collect information on how and what you browse (this tracking usually happens automatically⁠—keep reading to learn how to stop it).

The two main types of website visitor tracking you need to know about are first-party and third-party: first-party tracking is data collected directly by the domain you’re visiting, while third-party tracking is when data is collected by a different party (we’ll show you how to avoid this type of data collection below).

Here’s an overview of the most common online tracking technologies and how they track behavior online.

1. IP tracking

Every internet connection has a unique IP (Internet Protocol) address that’s associated with a country and approximate location.

Most website analytics tools—for example, Google Analytics—use IP addresses to approximate user location, which can help teams understand where their audience is based, and segment data for insights.

[Visual] GA4 - Google analytics - user-location-tracking-google-analytics-4-1

A map of real-time website visitor locations in GA4

For example, in Contentsquare you can filter session replays with errors by user country, to understand bugs that only affect users in particular regions. This is invaluable for spotting errors related to localization.

[Visual] Session replay with errors
Contentsquare’s Session Replay pinpoints areas of high frustration, then reduce friction in your key flows

By filtering your session replays by both error occurrence and geo-location, you can quickly understand localization-based errors 

2. Cookies

Most web analytics tools install browser cookies, which are small text files that store data and can identify users when they visit different pages on a website or, in some cases, track users across different websites.

There are several types of website cookies:

  • First-party cookies → generated by the site you’re on, only active when you’re on that site (for example, an ecommerce site that remembers what’s in your cart the next time you visit)

  • Third-party cookies → generated by a third-party site, can track users across multiple domains until the third-party cookie is deleted (for example, a Google Ad cookie used to serve targeted advertisements to the same user across different websites)

  • Session cookies → temporary cookies that only store data for a single session

  • Persistent cookies → permanent cookies that are stored until actively deleted

3. Pixel tracking

Tracking pixels work similarly to cookies, except that they’re tiny transparent images (measuring 1x1 pixels) that load via HTML on web pages or emails. Whenever a tracking pixel is loaded, analytics tools can report on whether users have opened an email or visited a page.

4. Fingerprinting

Fingerprinting is the process of compiling a unique identifier from an individual’s browser and computer settings. Fingerprints can then be used to track browsing activity across multiple pages or websites.

Any identifier can be used as part of a web fingerprint, including

  • Operating system (OS)

  • Screen resolution

  • Installed fonts

  • Browser add-ons or extensions

  • Browser version and settings

Contentsquare, for example, assigns a unique session identifier to every user session. This identifier includes: 

  • Project ID: this shows the Contentsquare project ID where the data is stored

  • User ID: an anonymous user ID for the user visiting the website

  • Session number: the number of sessions they’ve spent on your site. If Contentsquare has tracked 4 different sessions of the same anonymous user, the last session number will be 4

5. Device tracking

Device data—including OS, browser, and device type (like desktop or mobile app)—is collected by many analytics tools, and can be used to troubleshoot website bugs and design issues on specific devices, browsers, or screen resolutions.

For example, you can filter Contentsquare’s session replays by device, browser, and OS, which makes it easier to find bugs or barriers to conversion that are specific to users with particular hardware and software.

 [Visual] Monitoring
With Contentsquare, you can find out how fast your key pages load for users in the US. Or anywhere else, for that matter! You can also compare loading speeds between devices (see “Technographic segmentation” below).

You can filter Contentsquare’s data by device type: desktop, tablet, or mobile 

Privacy-first web tracking

Whether you’re a business using tracking tools on your website or a user concerned about your privacy online, you need to know what good and bad web tracking looks like.

For example, at Contentsquare, we have a privacy-first philosophy. We design our tools to record user interactions, not sensitive data. Here’s a quick rundown of some of our privacy features. Use these as a benchmark for finding other privacy-first tools:

  • We’re compliant with GDPR and CCPA (more on those below)

  • We’re ISO 27701 and ISO 27001 certified—we undergo regular third-party testing and audits to ensure our privacy practices are up to standard 

  • We follow data minimization principles. That means we only process the minimum amount of customer information required to provide users with our analytics services. For example, we block the capture of text and keyboard inputs from the website. This prevents sensitive personal data (such as names, emails, and credit card information) from being captured. 

  • We have a process that enables users to request and delete their data at any time

If you’re using any tracking tools on your product or website, you’ll need to comply with relevant web tracking laws, regulations, and guidelines.

A tracking platform that’s powerful, yet privacy-first

Contentsquare’s experience analytics tools help you truly understand your users’ behavior, without invading their privacy.

Web tracking laws

Recent developments in data privacy legislation have led to increased requirements for companies to disclose how they track, store, and use visitor data. For example: 

  • The GDPR (General Data Protection Regulation) regulates how companies can handle data from EU individuals, regardless of where a company is based 

  • The CCPA (California Consumer Privacy Act) protects the personal data of California residents in the USA 

How to stop a website from tracking you

You can limit the number of ways that websites track you by taking a few small actions. Here are seven beginner-friendly ways to get started:

1. Turn on tracking protection in your browser

Turn on the Do Not Track (DNT) setting in your browser (here are instructions for Chrome and Firefox).

In Firefox, you can also set Enhanced Privacy Protection to ‘Standard’ or ‘Strict’ to block social media and cross-site trackers and fingerprinting.

2. Block third-party cookies

If you block all cookies, most websites won’t work properly (for example, you probably won’t be able to sign in). But blocking third-party cookies helps you limit some cross-site online tracking. 

Many browsers now block third-party cookies by default, but in Chrome, you’ll need to go to Settings > Privacy and Security > Third-party cookies and select Block third-party cookies.

[Visual] Block third party cookie in Google Chrome

How to block third-party cookies in Google Chrome

3. Delete cookies

Set your browser to automatically delete cookies when you quit, or try to manually delete cookies regularly. Just remember that you’ll lose things like active logins and full shopping carts when cookies are removed.

4. Use a privacy browser extension or add-on

A privacy-focused browser extension, like Ghostery, blocks website tracking scripts and helps you understand which trackers are being used on your site, and what their purpose is.

[Visual] ghostery-block-website-tracking

Blocked advertising trackers in Ghostery

5. Use a privacy-focused browser

A privacy-focused browser provides additional website tracking blocking features. For example, Firefox blocks fingerprinting and cross-site cookies as standard, and Brave sends DNT requests by default.

6. Use a VPN

A VPN (Virtual Private Network), like ProtonVPN, will hide your IP address from websites. This does not stop websites from tracking you through other methods (for example, through cookies, pixels, or fingerprinting), but it will stop your ISP (Internet service provider) from collecting data on the websites you browse.

7. Block images in emails

When you block images by default, email marketing software like Mailchimp can't use pixels to track when you open emails. In Gmail, go to Settings > General > Images and select “Ask before displaying external images”.

How to track website users (the right way)

Now that you know what website tracking is and how to track it while keeping user website tracking privacy in mind, here’s a quick overview of how to get started.

1. Pick the right tool to track what you need

First, ask yourself: why do you want to track website users?

Yes, website tracking tools allow you to track almost anything on any digital product, but you need to think about your end goal so you don’t get stuck in a cycle of tracking, and reporting on metrics, just because you can.

For example, you might be trying to

Once you’ve defined your goal, you’ll be in a better place to find the right tool.

You can learn more about the best website tracking tools in the dedicated chapter of this guide, but here are a couple to get started with:

[Visual] Heatmaps & Engagements

Contentsquare gives its users 5 different types of heatmaps to understand click and scroll behavior

2. Install the tracking script

If you’re using Contentsquare, you can add your unique tracking code using a Tag Management System (TMS) like Google Tag Manager, Adobe Launch or Tealium, or by manually pasting it into your HTML.

3. Analyze the data

As we mentioned above, there’s no point collecting data you’re never going to look at. Once you’ve got some numbers rolling in, it’s time to start analyzing the data in relation to your main tracking goal. 

If you’re analyzing a heatmap to increase conversions, for example, you can start by asking yourself:

  • Are people seeing important content?

  • Are people clicking on key page elements (links, buttons, and CTAs)?

  • Are they confused by non-clickable elements?

  • Are they getting distracted?

  • Are they experiencing issues across devices?

You’ll get more out of website tracking if you analyze data from different sources. For example, combining Contentsquare with Google Analytics allows you to segment your tracking data in a granular way, and get deep insights into each user segment’s experiences. You could create an audience of users that received a particular advert (using GA4), and view heatmaps that reveal their behavior on a page (using Contentsquare).

[Visual] Journeys - Sunburst - Users list

Draw together insights from several pieces of tracking data to understand the next steps you need to take

A tracking platform that’s powerful, yet privacy-first

Contentsquare’s experience analytics tools help you truly understand your users’ behavior, without invading their privacy.

FAQs about website tracking 

  • Websites track visitors by using technologies such as cookies, pixels, and fingerprinting to measure browsing behavior and serve personalized content. People can stop unwanted website tracking by blocking or deleting cookies, using a VPN, and turning on Do Not Track (DNT) in their browser.

Contentsquare's Content Team

We’re an international team of content experts and writers with a passion for all things customer experience (CX). From best practices to the hottest trends in digital, we’ve got it covered. Explore our guides to learn everything you need to know to create experiences that your customers will love. Happy reading!