Create a property, install the snippet, report consent and confirm your first events in about fifteen minutes.
This page takes a website from nothing to verified Pixel events: create a property, install the snippet, report consent, then check the result. Every step works in Kentro GO (Pixel in the navigation) and through the management API.
In this page
-
- Create a property
-
- Get the install snippet
-
- Install the snippet
-
- Report consent
-
- Verify the install
1. Create a property
A property is one place you measure: a website, a store, a Kentro GO landing page, a mobile app or a server source. Each property has its own keys, allowed origins, consent settings and privacy mode.
In Kentro GO, open Pixel, then the Properties tab, and click New property (Create a property when the list is empty). With the API, writes need the pixel:manage permission (see Management API).
curl -sS https://apis.kentro.live/pixel/v1/properties \
-H "Authorization: Bearer $KENTRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Main website",
"type": "website",
"environment": "production",
"allowed_origins": ["www.example.com", "*.example.com"],
"privacy_mode": "standard"
}'
| Field | Required | Notes |
|---|---|---|
name | yes | 1 to 200 characters. |
type | yes | website, shopify, woocommerce, go_page, mobile_app or server. |
environment | no | production (default), staging or development. Fixed at creation. Production properties get pk_live_ keys, the others pk_test_ keys. |
allowed_origins | no | Up to 50 host names allowed to send browser events. Empty means any origin. See Domains. |
settings | no | Consent, sensitive path patterns, the health vertical flag, lead retention, sessions and retention. See Consent and privacy. Invalid sensitive path patterns, or a privacy.healthVertical other than true, false or null, answer 400. |
privacy_mode | no | standard (default) or strict. |
The 201 response contains the property and its first public key:
{
"property": {
"id": "0192f0c4-6d1e-7a52-9c1f-3b1f2c7f9a10",
"name": "Main website",
"type": "website",
"environment": "production",
"allowed_origins": ["www.example.com", "*.example.com"],
"settings": {
"consent": { "requireForAnalytics": true, "requireForMarketing": true, "defaultWhenUnknown": "denied", "honorGpc": true },
"tracking": { "autoPageviews": true, "spaRoutes": true, "clicks": false, "forms": false, "formFieldAllowlist": [], "performance": true, "errors": false },
"sensitivePathPatterns": [],
"privacy": { "healthVertical": null },
"lead": { "rawEmail": false },
"session": { "idleMinutes": 30, "maxHours": 12 },
"retention": { "journalMonths": 13, "errorsDays": 30 }
},
"privacy_mode": "standard",
"status": "active",
"verified_at": null,
"created_at": "2026-10-09T17:00:00.000Z",
"updated_at": "2026-10-09T17:00:00.000Z"
},
"public_key": {
"id": "0192f0c4-6d1f-7b33-8d2e-5a9e0b1c2d3e",
"key": "pk_live_Xq3M9b2LkV7tR1sNw8YhC4Ze",
"label": "default",
"status": "active",
"last_used_at": null,
"created_at": "2026-10-09T17:00:00.000Z",
"revoked_at": null
}
}
A public key is meant to be visible in your page source. Restrict where it can be used with allowed_origins, and revoke it with DELETE /v1/properties/:id/keys/:keyId (the key's id) if it leaks into places you do not control. POST /v1/properties/:id/keys creates additional keys, for example one per site. In Kentro GO, both live on the property's Keys tab.
2. Get the install snippet
In Kentro GO, the property's Install tab shows the snippet with Copy snippet, plus the SDK URL, the Collector endpoint and the Public key. With the API:
curl -sS https://apis.kentro.live/pixel/v1/properties/$PROPERTY_ID/snippet \
-H "Authorization: Bearer $KENTRO_TOKEN"
{
"property_id": "0192f0c4-6d1e-7a52-9c1f-3b1f2c7f9a10",
"public_key": "pk_live_Xq3M9b2LkV7tR1sNw8YhC4Ze",
"snippet": "<script>window.kentroPixel=window.kentroPixel||function(){(window.kentroPixel.q=window.kentroPixel.q||[]).push(arguments)};</script>\n<script async src=\"https://pixel.kentro.live/sdk/v1/kentro-pixel.js\" data-key=\"pk_live_Xq3M9b2LkV7tR1sNw8YhC4Ze\"></script>",
"sdk_url": "https://pixel.kentro.live/sdk/v1/kentro-pixel.js",
"endpoint": "https://pixel.kentro.live"
}
The snippet uses the oldest active public key of the property; a property without an active key answers 409 NO_ACTIVE_KEY.
3. Install the snippet
Paste the two tags into the <head> of every page, or load the SDK from your own script bundle:
<script>window.kentroPixel=window.kentroPixel||function(){(window.kentroPixel.q=window.kentroPixel.q||[]).push(arguments)};</script>
<script async src="https://pixel.kentro.live/sdk/v1/kentro-pixel.js" data-key="pk_live_Xq3M9b2LkV7tR1sNw8YhC4Ze"></script>
// Queue stub first, so calls made before the SDK loads are kept and replayed in order.
window.kentroPixel = window.kentroPixel || function () {
(window.kentroPixel.q = window.kentroPixel.q || []).push(arguments);
};
// Without a data-key attribute, pass both key and endpoint to init.
window.kentroPixel('init', {
key: 'pk_live_Xq3M9b2LkV7tR1sNw8YhC4Ze',
endpoint: 'https://pixel.kentro.live'
});
var script = document.createElement('script');
script.async = true;
script.src = 'https://pixel.kentro.live/sdk/v1/kentro-pixel.js';
document.head.appendChild(script);
- The queue stub defines
window.kentroPixel: calls made before the SDK has loaded are kept inkentroPixel.qand replayed in order once it arrives. - When the script tag carries
data-keyand nothing has queued aninitcall, the SDK initializes itself: it starts a session, sendsmarketing.session_startedand amarketing.page_viewed, and tracks route changes of single-page apps. - If your site sends a Content-Security-Policy, allow
https://pixel.kentro.liveinscript-srcandconnect-src, and allow the inline stub with a nonce or hash.
4. Report consent
With the default consent settings, events are recorded as suppressed until your consent banner reports analytics consent. Pass the current choice at init and report every change:
kentroPixel('consentChanged', {
analytics: 'granted',
marketing: 'denied',
functional: 'granted',
policy_version: '2026-10',
source: 'cmp'
});
See Consent integration for a full consent manager example, and Consent and privacy for how Kentro decides.
5. Verify the install
Open your site, then check three places.
The network tab. The browser's developer tools show POST https://pixel.kentro.live/v1/events answering 202 with one result per event: { "receipt_id": "...", "results": [{ "event_id": "evt_...", "status": "accepted" }] }.
The event debugger. It lists the newest events Kentro recorded for the property (accepted, quarantined or suppressed), with property values reduced to key names and value types. In Kentro GO, open the property's Debugger tab. With the API:
curl -sS "https://apis.kentro.live/pixel/v1/events/debug?propertyId=$PROPERTY_ID&limit=20" \
-H "Authorization: Bearer $KENTRO_TOKEN"
{
"events": [
{
"id": "0192f0c5-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
"property_id": "0192f0c4-6d1e-7a52-9c1f-3b1f2c7f9a10",
"event_id": "evt_192f0c51a2b9f3c7d1e5a2b4c6d8e0f",
"event_name": "marketing.page_viewed",
"schema_version": 1,
"source_type": "browser",
"environment": "production",
"occurred_at": "2026-10-09T17:05:00.000Z",
"received_at": "2026-10-09T17:05:00.412Z",
"processing_status": "pending",
"data_classification": "standard",
"anonymous_id": "anon_6f1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e",
"session_id": "sess_0a1b2c3d4e5f60718293a4b5",
"refs": { "subject_ref": null, "commerce_subject_ref": null, "order_ref": null, "campaign_ref": null, "creative_ref": null, "landing_page_ref": null, "experiment_ref": null, "experiment_variant_ref": null },
"context": { "page_url": "https://www.example.com/pricing?utm_source=google", "page_path": "/pricing", "page_title": "Pricing", "referrer_domain": "www.google.com", "utm": { "source": "google" }, "device_class": "desktop", "bot": false, "locale": "en-US", "sdk": { "name": "kentro-pixel-js", "version": "1.3.0" } },
"consent": { "analytics": "granted", "marketing": "denied", "functional": "unknown", "policy_version": "2026-10", "source": "cmp", "recorded_at": "2026-10-09T17:04:58.000Z", "region": null, "gpc": false },
"properties_shape": { "page_path": "string", "title": "string" },
"provenance": { "source_type": "browser", "source_id": "pk_live_Xq3M9b2LkV7tR1sNw8YhC4Ze", "schema": "builtin", "is_authoritative": true, "consent_effective": { "analytics": "granted", "marketing": "denied", "functional": "granted" }, "consent_purpose": "analytics", "sdk": { "name": "kentro-pixel-js", "version": "1.3.0" } },
"renamed_from": null
}
]
}
processing_status | Meaning |
|---|---|
pending | Accepted, waiting for the background processor. |
processed | Accepted and handled by the processor. |
suppressed_consent | Recorded minimized because consent was missing or denied. |
quarantined | Sensitive data detected; never processed. |
Consent-suppressed events are shown minimized ("minimized": true): no identifiers, references or property shape, and only the referrer domain, device class, bot flag and locale of the context. Raw ad click ids are never shown (only click_id_hashes), and neither is the raw user agent. renamed_from is the name the event was sent with when Kentro recorded it under another name (the deprecated marketing.product_viewed is recorded as commerce.product_viewed), else null.
Ingestion health. Rejected events never enter the debugger. Ingestion health shows 24-hour counters and the last ten rejections with their reason codes. In Kentro GO, the Health tab shows each reason in plain words first (for example "Properties did not match the event schema"), with the reason code and the collector's own message under it.
curl -sS "https://apis.kentro.live/pixel/v1/ingestion/health?propertyId=$PROPERTY_ID" \
-H "Authorization: Bearer $KENTRO_TOKEN"
{
"window_hours": 24,
"since": "2026-10-08T17:10:00.000Z",
"receipts": 42,
"accepted": 120,
"duplicates": 3,
"rejected": 2,
"quarantined": 0,
"suppressed": 15,
"freshness": { "last_received_at": "2026-10-09T17:09:58.000Z", "age_seconds": 2 },
"last_errors": [
{ "received_at": "2026-10-09T16:40:00.000Z", "source_type": "browser", "event_name": "marketing.page_viewed", "reason_code": "SCHEMA_VIOLATION", "reason": "properties must NOT have additional properties", "property_id": "0192f0c4-6d1e-7a52-9c1f-3b1f2c7f9a10" }
]
}
To check events before you send them, paste one envelope, an array of envelopes or { "events": [...] } (up to 100) into the property's Validate tab. Each event comes back Valid or Invalid, with what the collector would do with it and why; nothing is stored. The same check is available as POST /v1/event-schemas/validate (see Validation).
Use an AI assistant
Build it with an AI agent
Install the Kentro Pixel browser SDK on a website, wired to the site's consent manager, and verify the first events. Copy the prompt into Claude Code, Codex, Cursor or another coding agent. The prompt library explains how to run it.
You are installing Kentro Pixel on the user's website: the browser SDK, wired to the site's consent manager, so page views and the site's key events reach Kentro with each visitor's consent.
Read first. Fetch https://docs.kentro.io/llms.txt and these pages:
- https://docs.kentro.io/docs/ai-agent-instructions.md (rules you must follow)
- https://docs.kentro.io/docs/kentro-pixel.md
- https://docs.kentro.io/docs/pixel-quickstart.md
- https://docs.kentro.io/docs/pixel-browser-sdk.md
- https://docs.kentro.io/docs/pixel-events.md
- https://docs.kentro.io/docs/pixel-consent-privacy.md
Ask the user for these before writing code:
1. The site's framework, and where the shared head or root layout is rendered.
2. The Pixel property's public key, from Kentro GO: `Pixel`, the `Properties` tab, the property, the `Install` tab. Production properties have pk_live_ keys; staging and development properties have pk_test_ keys. A public key is meant to be visible in the page.
3. Which Kentro environment the property lives in: production (collector https://pixel.kentro.live) or Kentro staging (collector https://pixel.kentro.dev).
4. The consent manager the site uses, and how its categories map to Kentro's purposes: analytics, marketing and functional.
5. Whether the site sends a Content-Security-Policy, and which events matter beyond page views (sign-ups, add to cart).
Rules:
- Only the public key goes in the page. Never put a Pixel server key (sk_...) or its secret in browser code.
- Install the queue stub before the SDK script, exactly as the snippet on the `Install` tab (or GET https://apis.kentro.live/pixel/v1/properties/:id/snippet) shows. Load https://pixel.kentro.live/sdk/v1/kentro-pixel.js (or the .dev host) with data-key, or call `kentroPixel('init', { key, endpoint })`.
- Report consent at init and on every change with `kentroPixel('consentChanged', { analytics, marketing, functional, policy_version, source })`, with granted or denied for each purpose. Without analytics consent, events are recorded as suppressed by design: never work around it.
- Never send identity claims (subject_ref) from the browser, and never put emails, phone numbers or other personal data in event properties. A signed-in visitor is identified only through an identity token the user's server signs, as the Browser SDK page describes.
- Use only event names and properties from the taxonomy (GET https://apis.kentro.live/pixel/v1/event-schemas), and validate custom events before shipping.
- With a CSP, allow the collector host in script-src and connect-src, and allow the inline stub with a nonce or hash.
- No fingerprinting and no ad-blocker workarounds.
Steps:
1. Add the stub and the SDK script to every page (the root layout), or the script loader with init.
2. Translate the consent manager's state into consentChanged on load and on every change.
3. Single-page apps: after auto-init the SDK tracks route changes. Confirm it, and do not add duplicate page views.
4. Add the site's key events with the event names from the Events page.
5. Ask the user to check that the property's allowed origins (the `Domains` tab) list the site's hosts.
Acceptance checks. Run each one and show the user the evidence:
- In the browser's network tab, POST `<collector>/v1/events` answers 202 with one result per event, status accepted (or suppressed before consent).
- Before consent, the newest events show processing_status suppressed_consent in the property's `Debugger` tab (or GET https://apis.kentro.live/pixel/v1/events/debug?propertyId=...&limit=20 with credentials holding pixel:read). After analytics consent, marketing.page_viewed shows pending or processed.
- The `Health` tab (GET /v1/ingestion/health?propertyId=...) shows no new rejections, and any reason code it lists is fixed.
- Every custom event passes the property's `Validate` tab or POST /v1/event-schemas/validate.
- The browser console shows no CSP violations, and no server key appears in the site's code.
Next steps
- Browser SDK: every method, storage and consent integration.
- Events: which event to send for each action.
- Server API: send paid orders from your backend so revenue reporting trusts them.

