> For the complete documentation index, see [llms.txt](https://support.sayprimer.com/primer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.sayprimer.com/primer/primer-support-review/website-tracking/installing-the-pixel.md).

# Installing the pixel

Add Primer's website pixel to your site by pasting the snippet or using Google Tag Manager.

Primer's website pixel identifies the companies and people visiting your site so you can build audiences and track conversions from that traffic.

## The snippet

Add this script to your site, replacing `{CLIENT_ID}` with your organization's client ID (shown on the website-tracking screen in Primer):

```html
<script async src="https://web-script.api.sayprimer.com/primerAnalytics.js?clientId={CLIENT_ID}"></script>
```

## Where to put it

* **Directly in your HTML** — paste the snippet into the `<head>` of every page.
* **Google Tag Manager** — add it as a **Custom HTML** tag that fires on all pages.

## Content Security Policy

If your site sets a Content Security Policy, add these domains to the matching directives — if any is missing, the browser blocks the pixel and **no traffic reaches Primer**:

* `script-src https://cdn.jsdelivr.net https://tags.fullcontact.com` — the pixel loads FingerprintJS (from `cdn.jsdelivr.net`) and FullContact (`tags.fullcontact.com`) to identify visitors.
* `connect-src https://web-script.api.sayprimer.com` — the pixel sends events here.

### If the pixel isn't being blocked by CSP

A too-strict CSP fails **silently to you but loudly in the browser**: the page keeps working, but you'll see **Content Security Policy** violation errors in the browser's developer console, and Primer stays **Not connected** because events never leave the page. If connection status won't turn green after installing:

1. Open your browser's developer console on a page with the pixel and look for CSP violations naming `web-script.api.sayprimer.com`, `cdn.jsdelivr.net` or `tags.fullcontact.com`.
2. Add whichever domain is being blocked to the directive named in the error (`script-src` or `connect-src`), then reload.

After installing, check that Primer is receiving traffic — see [Pixel connection status](/primer/primer-support-review/website-tracking/pixel-connection-status.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://support.sayprimer.com/primer/primer-support-review/website-tracking/installing-the-pixel.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
