# Set Up Website Visitor Tracking

Last updated Sep 23rd, 2026

Website visitor tracking allows you to gain rich signal by understanding who is viewing your website and documentation. This guide will walk you through the process of setting up tracking, identifying known users, and maximizing your data collection.

Before you begin, ensure you have:
- Administrative access to your website's codebase (not required for the basic Google Tag Manager setup)
- An understanding of basic JavaScript and web analytics (not required but recommended)

## Availability

Website visitor tracking is available on all plans.

## Step 1: Installing the Tracking Snippet

1. Log in to your Common Room account and navigate to Settings.
2. Click on the "Signals and integrations" tab.
3. Select "Website visits" to find your unique tracking snippet.

Once you have your tracking snippet, choose one of the following methods to add the tracking snippet:

### Option A: Direct Installation

1. Copy the provided snippet from your Common Room settings.
2. Paste it within the <body> tag of your website's HTML.

Example:

```javascript
<script>(function() {
  // Paste your unique tracking snippet here
})();
</script>
</body>
```

### Option B: Using Google Tag Manager

1. In Google Tag Manager, create a new tag of type "Custom HTML".
2. Paste the tracking snippet into the tag.
3. Set the trigger to "All Pages".
4. Save and publish your changes.

### Option C: For React/Next.js/Gatsby Applications

Add the script to a high-level component:

```javascript
import React from 'react';

const Layout = ({ children }) => (
  <div>
    {children}
    <script dangerouslySetInnerHTML={{
      __html: `Tracking snippet here (avoid duplicate <script> tags)`,
    }} />
  </div>
);

export default Layout;
```

## Step 2: Identifying Known Users

To identify the users who might have visited your website, associate their anonymous visit information (ex: IP address) with identify information (ex: an email or name).

Enable our [Enhanced US visitor tracking](/content/docs/signals/website-visitor-tracking/vector-integration/index.html) option to start identifying US-based visitors to your website. This option updates the code snippet from Step 1 to leverage web visit identification technology.

**Tip:** Implementing identity calls has been shown to increase deanonymization rates by over 50%.

If your website accepts form submissions (ex: entering emails for access to a case study), that presents an opportunity to identify users. Implement the following line of code when you have an email available:

```javascript
window.signals.identify({ email: userEmail })
```

### Example: Identifying a User After Form Submission

```javascript
function onUserLogin(user) {
  // Your login logic here

// Identify the user with Common Room
  window.signals.identify({
    email: user.email,
    name: user.fullName
  });
}
```

### Example: Identifying a User After Login

```javascript
function onUserLogin(user) {
  // Your login logic here

// Identify the user with Common Room
  window.signals.identify({
    email: user.email,
    name: user.fullName
  });
}
```

From your marketing or app website, you can issue an API call to identify a user by their email.

## Step 3: Link Tracking

Track clicks on links in marketing and sales messages by adding a parameter to links within your message templates.

**Tip:** Implementing UTM tracking has been shown to increase deanonymization rates by over 50%.

### Add the URL Parameter

At the end of each link, add the URL parameter `cr_email={{email}}` using the correct email token for your system.

### Email Token/Variable

Email address variables from tools you might be using:
1. **HubSpot** uses `{{contact.email}}`
2. **Apollo.io** uses `{{email}}`
3. **Outreach** uses `{{email}}`
4. **Salesloft** uses `{{email_address}}`

### Encoded Email Address (optional)

If preferred, encode the email address: `{{contact.base64_email}}`, using an alternate URL parameter: `cr_e={{email}}`.

### TIP: How to Add Parameters Correctly

If this parameter is the first, add a `?` at the beginning:

`https://example.com/pricing/?cr_email={{email}}`

If the parameter follows others, add a `&` like so:

`https://example.com/pricing/?utm_source=cr&cr_email={{email}}`

## FAQs

### What info would Common Room tracking provide for existing customers or prospects once we capture them via a form?

When we capture the conversion event, we can correlate it with any historical website visits where the user was anonymous, blending this with any other signals captured in Common Room.

### Does the tracking snippet need to be embedded in the forms of our site?

If you want to track forms on the website where you're running our script, no additional actions are needed. The script automatically tracks form submissions containing an email field.

### Does Common Room drop cookies?

Website visitor tracking does not use any 3rd party cookies, only 1st party cookies to correlate user visits.
