> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crispstats.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> CrispStats is a hosted, privacy-first analytics product. It has no self-hosted edition, no session replay, no heatmaps, no A/B testing and no data import except a site's history from a Plausible export (Settings, Import and export). Websites use the script. iOS, Android, React Native and Flutter use the mobile SDKs in the install guides. Those SDKs are source files, not a published package, and they do not read an advertising id.
> The script global is crispstats(...), site keys start with cs_pk_ and secret API keys start with cs_sk_. The script is served from https://in.crispstats.com/d.js and the REST API lives at https://crispstats.com/api/v1.
> The script tag is the main install; the npm package @crispstats/tracker does the same from code, never alongside the tag. Integrations copy the script tag, the queue stub, crispstats.d.ts and proxy code from these docs or from Settings, Tracking code in the dashboard. A first-party proxy forwards one path of the site to https://in.crispstats.com/p/ and forwards only content-type, user-agent, accept-language, referer, origin, if-none-match and x-forwarded-for, never cookies.

# See the Google searches that bring visitors

> Connect Google Search Console to a CrispStats site. The Overview's Sources card gets a Keywords tab with clicks, impressions, CTR, average position and an estimate of the revenue each search leads to.

Connect Google Search Console and the **Sources** card on the Overview gets a **Keywords** tab: the searches your site appeared for on Google, with clicks, impressions, click-through rate, average position and an estimate of the revenue each one leads to.

| | |
| - | - |
| You connect | Your Google account, with read-only access to Search Console |
| It reads | One Search Console property: queries per day and page |
| History | The last 90 days, imported a few minutes after you choose the property |
| Updates | Once a day; the last five days are read again each time |
| Delay | Google publishes the data two to three days late |
| Shown on | The Overview of that site, for people in your workspace. Never on public dashboards |

## Set it up

**1. Open the Integrations tab**

Open the site, then **Settings**, **Integrations**. Owners and admins of the workspace can connect; members and viewers see the card read-only.

**2. Connect with Google**

Click **Connect with Google** and sign in with the Google account that can see the site in Search Console. Allow read access to Search Console. CrispStats also reads the account's e-mail address, so admins can see which account is connected.

**3. Choose the property**

Back on the Integrations tab, pick the property for this site. The one that matches the site's domain, with or without `www`, is chosen for you; a domain property (`sc-domain:example.com`) is preferred over a URL prefix because it covers every subdomain and protocol.

**4. Wait a few minutes**

The last 90 days are imported in the background. The **Keywords** tab appears on the Overview's Sources card once the property is chosen.

## What the Keywords tab shows

The card lists the queries with the most clicks in the selected period. **See all** opens every query with clicks, impressions, CTR and average position, searchable and sortable.

* **Clicks** and **impressions** are Google's own counts. They are usually a little higher than the visits CrispStats records from Google, because Google counts clicks from people who block scripts and from bots it did not filter.
* **CTR** is clicks divided by impressions.
* **Position** is the average position in Google's results, weighted by impressions. 1 is the top.
* Days are whole days in the site's timezone. A period that ends today stops at the last day Google has published, shown under the list.
* Only page filters narrow the keywords: a query counts when it led to a matching page. Other filters, such as country or device, do not apply, and the tab says so.

## The revenue estimate

Google does not tell a site which search a visitor typed, so revenue per keyword is always an **estimate**, and the dashboard labels it that way.

For every page a query brought clicks to, CrispStats takes that page's revenue as the landing page of visits from Google search (first touch, refunds not subtracted), and gives the query its share of the page's Search Console clicks. The estimates of a query's pages are added up.

For example, if `/pricing` brought in $1,000 from Google search visits and received 100 clicks in Search Console, 40 of them from "acme pricing", that query's estimate for the page is $400.

The estimate is left out when the site has never recorded a payment. Set up revenue in **Settings**, **Revenue** to see it.

## What is stored

* Per day, query and page path: clicks, impressions and average position. Page addresses are stored as paths, without the host or query string.
* Rows are kept as long as your plan keeps visits, then deleted.
* The Google refresh token, encrypted, readable only by the service that syncs. It is never shown or logged.
* The Google account's e-mail address, shown to the site's owners and admins.

Search Console data is never shown on public dashboards or embeds.

## Change the property

Click **Change property** on the card. Choosing a different property deletes the keywords stored from the old one and imports 90 days of the new one.

## Disconnect

Click **Disconnect**. CrispStats deletes the stored Google access and every keyword stored for the site, and stops syncing. It also revokes its access at Google, unless another of your sites still syncs with the same Google account: revoking would stop that site too. To remove access completely, disconnect every site that uses the account, or remove CrispStats under **Third-party apps and services** in your Google account. Connecting again imports the last 90 days again.

You can also remove access from your Google account, under **Security**, **Third-party apps and services**. The card then asks you to reconnect.

## Troubleshooting

> [accordion] My property is not listed
>
> The list shows the properties of the Google account you connected. Check that the site is added in [Search Console](https://search.google.com/search-console) under that account. A new property can take a moment to show up: reconnect after adding it.

> [accordion] I connected the wrong Google account
>
> Click **Disconnect**, then **Connect with Google** again and pick the other account on Google's screen. If Google signs you straight in, sign out of the wrong account in your browser first.

> [accordion] A property says it is not usable
>
> Google returns data only to verified owners and to users the owner added. A property marked **Not verified in Search Console** needs to be verified, or an owner has to add your account under **Settings**, **Users and permissions** in Search Console. Restricted users can be connected.

> [accordion] The card says Google did not grant lasting access
>
> Google only issues the long-lived token on a fresh consent. Remove CrispStats under **Third-party apps and services** in your Google account, then connect again.

> [accordion] The card asks me to reconnect
>
> Google stopped accepting the connection: access was removed, the password changed, or the account lost access to the property. Click **Reconnect with Google**. Syncing stops until you do, and the keywords already stored stay.

> [accordion] The newest days are missing
>
> Google publishes Search Console data two to three days late. The line under the list says the last day it covers.

## API

The same data is available from the REST API: `GET /api/v1/sites/{siteId}/search-keywords`, with the period, `search`, `sort` (`clicks`, `impressions`, `ctr`, `position` or `revenue`), `dir`, `limit` and `offset`. See the [API reference](https://docs.crispstats.com/api-reference/introduction.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.