Docs
Everything you need to run CodeGecko.
Step 1
Create a project
Sign in, name the project and enter your website, like https://shop.example. You get three values. They’re shown once, so save them now.
| Value | Save it in | Used for |
|---|---|---|
| Deployment Secret | CI secrets, as CODEGECKO_SECRET | Registering releases. Keep it private. |
| Public Key | The script tag (step 3) | Sending visit data. Safe to show: it only works from your website. |
| Project ID | CI variables, as CODEGECKO_PROJECT | Telling us which project it is. |
Step 2
Register each deploy
Code on GitHub? Open your project’s Setup page and click Connect GitHub. Our GitHub App registers each production deploy for you, with the commits that shipped: no secret and no workflow file. It only reads commits and deploy status.
Elsewhere, add this after your deploy step. It tells CodeGecko which commit is live. Do it before step 3: visits are ignored until a release exists.
- name: Tell CodeGecko what shipped run: | curl -X POST https://www.codegecko.dev/api/releases \ -H "Authorization: Bearer ${{ secrets.CODEGECKO_SECRET }}" \ -F projectId=${{ vars.CODEGECKO_PROJECT }} -F commit=$GITHUB_SHA
codegecko: stage: .post rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH script: - curl -X POST https://www.codegecko.dev/api/releases -H "Authorization: Bearer $CODEGECKO_SECRET" -F projectId=$CODEGECKO_PROJECT -F commit=$CI_COMMIT_SHA
curl -X POST https://www.codegecko.dev/api/releases \ -H "Authorization: Bearer $CODEGECKO_SECRET" \ -F projectId=$CODEGECKO_PROJECT -F commit=$GIT_COMMIT_SHA
No CI access? Add data-commit to the script tag instead.
Step 3
Add the script
Paste this tag into the <head> of every page, usually in your shared layout. It loads after your page and measures each visit.
<script async src="https://www.codegecko.dev/collector.js" data-project="your-project-id" data-key="cg_pub_…" data-version="1.0.0"></script>
| Attribute | Needed | What it is |
|---|---|---|
| data-project | Yes | Your project ID, from Setup. |
| data-key | Yes | Your public key, from Setup. |
| data-version | Optional | Your app’s current version. Leave it out and your first release is v1.0.0. Name your releases |
Step 4
Check it’s working
Deploy, open a few pages of your site, close the tab, then open the dashboard. You should see:
- Your release,
v1.0.0, under Releases. - Measurements counting up within a minute.
- Pages grouped:
/products/blue-shoe-42shows as/products/:slug.
Nothing there? See response codes. All good? Deploy again: your next release gets a verdict once each page has 30 measurements of each metric.
Optional
Name your releases
By default the first release we get is v1.0.0, then v1.0.1 and so on. Prefer another format? Choose one in Settings → Releases. Every release is renamed at once, older ones too.
| Format | Looks like | Pick it when |
|---|---|---|
| Version number | v1.0.0 | You don’t version your app yourself. This is the default. |
| Commit SHA | a3f9c1e | You want each release to match a commit in git. |
| Your own pattern | V2.4.0 | You have your own style. Type it with x.y.z where the number goes, like Vx.y.z or app-x.y.z. |
Start from your app’s version
Already at 2.4.0? Set the optional data-version on the script tag. Your current release becomes 2.4.0 and each one after it counts up by one: 2.4.1, 2.4.2 and so on.
<script async src="https://www.codegecko.dev/collector.js" data-project="your-project-id" data-key="cg_pub_…" data-version="2.4.0"></script>
- Write it as
2.4.0orv2.4.0. With your own pattern, its form works too, likeapp-2.4.0. - CodeGecko reads it once, the first time it arrives. A version it can’t read is skipped; visits still count.
- To change it later, for example when you jump to 3.0.0, set Baseline version in Settings → Releases. Older releases keep their names.
Understand
Reading a report
Each release gets one word. Open it to see every page on mobile and desktop, the before and after numbers, and the commits that shipped.
| Verdict | Means |
|---|---|
| Improved | Something got faster, nothing got slower. |
| Regressed | Something got slower, nothing got faster. |
| Mixed | Some things got faster, some slower. |
| Unchanged | Nothing moved enough to matter. |
| Gathering data | Fewer than 30 measurements so far. Still collecting. |
| Inconclusive | The next release shipped before this one reached 30 measurements. |
A verdict compares with the last release. It’s not a score: Good, Needs improvement and Poor show where a page stands today.
Understand
How a verdict is decided
Four rules, applied to every page, device and metric.
- 01Compare like with likeMobile with mobile, /checkout with /checkout, and each release only with the one before. Similar pages count together: every product page is
/products/:slug. - 02Use the typical visitWe take the 75th percentile: three in four visits were this fast or faster. One slow visit can’t skew it, and it’s the measure Google uses.
- 03Wait for 30 measurementsBoth releases need 30 measurements of each metric on a page and device before there’s a verdict. You can change that number in a project’s Settings.
- 04Ignore small changesA change has to be bigger than 5% and bigger than a minimum per metric, like 100ms for LCP. Noise never triggers a verdict.
LCP on /products/:slug 2.63s → 3.13s (+500ms) needed to count more than 132ms (5% of 2.63s) verdict Regressed
The release gets one word from all its pages: Mixed if some got faster and some slower, otherwise Regressed, Improved or Unchanged.
Understand
Metrics
Some metrics decide the verdict. The rest explain it, so you know where to look.
| Metric | What it measures | Minimum change | Role |
|---|---|---|---|
| LCP | When the main content shows | 100ms | Decides |
| INP | How fast the page reacts to a tap | 20ms | Decides |
| CLS | How much the layout jumps | 0.01 | Decides |
| FCP | When anything first shows | 100ms | Decides |
| TTFB | How fast the server answers | 50ms | Decides |
| JS errors | Share of visits with an error | 1 point | Explains |
| LoAF | Main-thread blocking (Chrome, Edge) | 50ms | Explains |
| Page weight | JS, CSS, images and fonts | 5 to 50 kB | Explains |
| Load steps | DNS, connect, server, download | 20 to 50ms | Explains |
| Third parties | Size and blocking from other sites | 20 kB · 30ms | Explains |
| Back/forward misses | Back and forward visits that loaded again instead of showing instantly | 2 points | Explains |
| Failed requests | Share of visits where a file or API call failed | 1 point | Explains |
| Rage clicks | Share of visits with three or more fast clicks on one spot | 1 point | Explains |
Single-page apps: moving between pages inside the app counts toward INP, CLS and errors, not loading times.
Want only Google’s Core Web Vitals to decide? Pick Core Web Vitals only in Settings, and FCP and TTFB move to explaining. Everything below TTFB is optional: turn it on in Settings when you want it. It never decides the verdict.
Understand
Which browsers report what
Each browser measures a different set of things, so some metrics have fewer readings than others. A missing number means the browser didn’t measure it, not that it was zero.
| Metric | Chrome, Edge | Safari | Firefox |
|---|---|---|---|
| LCP | Yes | Version 26.2 and newer | Yes |
| INP | Yes | Version 26.2 and newer | Version 144 and newer |
| CLS | Yes | No | No |
| FCP | Yes | Yes | Yes |
| TTFB | Yes | Yes | Yes |
| Load steps and Server Timing | Yes | Yes | Yes |
| Page weight | Yes | No | Yes |
| Third-party sizes | When the file’s server allows it | No | When the file’s server allows it |
| Main-thread blocking, third-party blocking and script blame | Yes | No | No |
| JS errors | Yes | Yes | Yes |
| Failed requests | Yes | Yes | Yes |
| Rage clicks | Yes | Yes | Yes |
| Back/forward misses | Yes, with the reason | Yes | Yes |
| Network speed | Yes | No | No |
| Country, browser and device type | Yes | Yes | Yes |
Chrome, Edge includes the other browsers built on Chrome’s engine, like Opera, Brave and Samsung Internet.
On iPhone and iPad, every browser uses Safari’s engine, so Chrome and Firefox there report like Safari.
Older versions report less. A visitor on Safari before 26.2 sends no LCP or INP, and one on Firefox before 144 sends no INP.
INP only comes from visits where someone tapped, clicked or typed. LCP, FCP and TTFB only come from full page loads, not page changes inside a single-page app.
Understand
What counts as a measurement
Plans are counted in measurements: one for each metric a page view sends. A view with LCP, INP, CLS, FCP and TTFB is 5. Browsers only send what they can measure, so a view where the visitor never clicked has no INP, and Safari and Firefox don’t report CLS. Those views cost 3 or 4.
Extra metrics count one each when you turn them on in Settings, and the script only measures the ones you turned on. Lists that belong to a metric, like each error message or third-party domain, are free. Sending the same view again, say when INP arrives after a first click, only counts what’s new. The allowance is shared by all your sites.
Understand
Why Google’s numbers differ
On the Overview’s 28 days view, each metric also shows Google’s own number from the Chrome UX Report (CrUX). It’s the same data PageSpeed Insights and Search Console use. We show the page’s numbers when Google has them, else the whole site’s.
They rarely match exactly, and that’s normal. Google only counts Chrome visitors who chose to share usage data; we count every browser. Google’s 28 days end a day or two ago; ours run to now. Google needs a steady stream of Chrome visits before it shares anything, so small or new sites may show no Google numbers at all.
Google’s numbers are only there to compare. They never decide a release’s verdict, and they don’t count toward your measurements.
Understand
Privacy and data
- No cookies, no personal data.
- Only the page template is sent, like
/products/:slug. Query strings, IDs and emails stay in the browser. - Keys are stored as hashes, never in plain text.
- Deleting a project deletes all its data.
Paste this into your own privacy policy. Swap [DAYS] for your plan’s history: 30 on the free trial, 90 on Starter, 183 on Pro, 396 on Scale, 396 on Agency, 730 on Volume, plus 365 with Longer history. Setup fills it in for you.
Performance monitoring
We use CodeGecko, a service run by Nour Cherif Essoussi, doing business as CodeGecko (California, USA), to measure how fast our website loads and responds for real visitors.
What is collected. When you view a page, a small CodeGecko script sends:
- Speed measurements: loading and interaction timings, such as Core Web Vitals, and timings our server reports.
- The page: its general address without any query string, for example /products/:slug, and the version of our site you saw.
- Your device: mobile or desktop, your browser family (for example Chrome), your browser’s rough estimate of your network speed, and your country.
- What went slow or wrong: names of page elements involved (for example button#checkout, never their text), JavaScript error messages with IDs, emails and tokens removed, addresses of files that failed to load, and the domains of third-party services the page loaded.
What is not collected. CodeGecko does not set cookies, does not fingerprint you, does not track you across websites, and does not collect your name, email or anything you type. Each page view gets a new random ID, so visits can’t be linked to each other or to you. The script keeps a small note in your browser’s local storage saying which measurements to take. It contains no identifier.
Your IP address. As with any web request, your IP address and browser user agent reach CodeGecko’s servers. CodeGecko does not store them with this data: it only keeps the country your IP address points to. Its hosting providers keep them in standard request logs for up to 7 days, for delivery and security.
Why. We use this data only to find and fix performance problems, based on our legitimate interest in running a fast, reliable website. CodeGecko processes it for us under a data processing agreement.
How long. The data is removed after [DAYS] days and permanently deleted 30 days later. Learn more in CodeGecko’s privacy policy.
Reference
POST /api/releases
Tells CodeGecko which commit just went live. Your CI calls it after every deploy, using your Deployment Secret. With GitHub connected, you don’t need it: our GitHub App registers each deploy for you.
| Field | Required | What it is |
|---|---|---|
| projectId | Yes | Your Project ID. |
| commit | Yes | The commit that’s live (full SHA). |
| commits | No | Recent git log, so the report can list what shipped. |
{ "version": "v1.0.7", "commit": "a3f9c1e…" }Reference
Response codes
| Code | Means | Fix |
|---|---|---|
| 401 | The Public Key doesn’t match this project | Copy it again from the project’s Setup page. |
| 402 | Collection is turned off | Turn it back on in the dashboard. |
| 403 | A different website than the one you entered, or collection is paused | Check the website in settings, including www. |
| 404 | No release registered yet, or wrong Project ID | Do step 2 first. |
| 429 | You hit a limit | See Limits |
Reference
Limits
Limits depend on your plan. Go over your monthly measurements and collection pauses until your next billing period, with no extra charges. data-commit can create up to 20 new releases a day. See plans.

Stuck on setup?
Tell us your framework and how you deploy. A real person replies, usually within a day.